When people are building out-of-tree VFS modules they have to use have an initialization entry point called samba_init_module, but if the module is ever moved into the source tree, that entry point has to change to <vfs_name>_init and the main Samba build infrastructure does the correct things for Shared modules vs statically linked modules. This makes the process hard to describe and understand. A simpler approach would be to change Makefile.in in examples/VFS to perform the same magic that the main build infrastructure does. These changes are made in checkins: 1080483319d4eb7a8cdee767fc41f7258e0e2537 and a15aefea27fffcbf622f7032e5d50628189a49bd This is the last change: commit 1080483319d4eb7a8cdee767fc41f7258e0e2537 Author: Richard Sharpe <realrichardsharpe@gmail.com> Date: Fri Mar 23 21:27:41 2012 -0700 Improve the Makefile. Use a standard make macro, not a shell command. Autobuild-User: Richard Sharpe <sharpe@samba.org> Autobuild-Date: Sat Mar 24 07:09:44 CET 2012 on sn-devel-104 diff --git a/examples/VFS/Makefile.in b/examples/VFS/Makefile.in index 55e2c04..f9b81eb 100644 --- a/examples/VFS/Makefile.in +++ b/examples/VFS/Makefile.in @@ -45,7 +45,7 @@ skel_transparent.@SHLIBEXT@: skel_transparent.@OBJEXT@ .c.@OBJEXT@: @echo "Compiling $<" - @$(CC) $(FLAGS) -c $< -D$(basename $@)_init=samba_init_module + @$(CC) $(FLAGS) -c $< -D$*_init=samba_init_module install: default
A similar, but slightly different change can be made to the v3-6.test branch: --- examples/VFS/Makefile.in 2012-04-22 17:30:45.631698392 -0700 +++ examples/VFS/Makefile.in.new 2012-04-22 17:30:20.619140189 -0700 @@ -36,7 +36,7 @@ %.$(OBJEXT): %.c @echo "Compiling $<" - @$(CC) $(FLAGS) -c $< + @$(CC) $(FLAGS) -c $< -D$*_init=init_samba_module install: default Please consider taking this patch for the next 3.6.x release so that the lives of VFS writers will be easier.
*** This bug has been marked as a duplicate of bug 8822 ***