examples/VFS/Makefile.in in master seems well out of date ...

Richard Sharpe realrichardsharpe at gmail.com
Sun Apr 15 14:55:01 MDT 2012


On Sun, Apr 15, 2012 at 1:03 PM, Richard Sharpe
<realrichardsharpe at gmail.com> wrote:
> On Sun, Apr 15, 2012 at 12:51 PM, Volker Lendecke
> <Volker.Lendecke at sernet.de> wrote:
>> On Sun, Apr 15, 2012 at 12:28:59PM -0700, Richard Sharpe wrote:
>>> On Sun, Apr 15, 2012 at 12:19 AM, Volker Lendecke
>>> <Volker.Lendecke at sernet.de> wrote:
>>> > On Sat, Apr 14, 2012 at 01:35:52PM -0700, Richard Sharpe wrote:
>>> The problem, it seems to me is that those who want to do out-of-tree
>>> modules are not served at all by the existing Makefile because they
>>> typically have no idea of what changes are needed.
>>
>> Is doing copy&paste on few the lines for "skel_transparent"
>> and replacing the name with something different really a
>> blocker for someone doing VFS development?
>
> You ask a very good question.
>
> I think it is OK to ask them to change a "few" lines, and my proposal
> about different Makefiles was just way over the top.
>
> However, doing a VFS already requires that they understand lots, and I
> think there is a way to change the Makefile so that they only have to
> change the "all:" target line.
>
> I will have to see what I can get to work.

OK, the following stands some chance of working on FreeBSD because it
work on Linux but does not depend on any GnuMakeisms and seems to
conform to the FreeBSD pmake documentation I found:

diff --git a/examples/VFS/Makefile.in b/examples/VFS/Makefile.in
index f9b81eb..e5b2389 100644
--- a/examples/VFS/Makefile.in
+++ b/examples/VFS/Makefile.in
@@ -29,25 +29,18 @@ VFS_LIBDIR  = $(libdir)/vfs
 all: skel_opaque. at SHLIBEXT@ shadow_copy_test. at SHLIBEXT@ \
        skel_transparent. at SHLIBEXT@

-skel_opaque. at SHLIBEXT@: skel_opaque. at OBJEXT@
-       @echo "Linking $@"
-       @$(CC) $(LDSHFLAGS) $(LDFLAGS) skel_opaque. at OBJEXT@ -o $@
-
-shadow_copy_test. at SHLIBEXT@: shadow_copy_test. at OBJEXT@
-       @echo "Linking $@"
-       @$(CC) $(LDSHFLAGS) $(LDFLAGS) shadow_copy_test. at OBJEXT@ -o $@
+# Pattern rules

-skel_transparent. at SHLIBEXT@: skel_transparent. at OBJEXT@
-       @echo "Linking $@"
-       @$(CC) $(LDSHFLAGS) $(LDFLAGS) skel_transparent. at OBJEXT@ -o $@
+.SUFFIXES: .so

-# Pattern rules
+. at OBJEXT@. at SHLIBEXT@:
+       @echo "Linking $<"
+       @$(CC) $(LDSHFLAGS) $(LDFLAGS) $*. at OBJEXT@ -o $*. at SHLIBEXT@

 .c. at OBJEXT@:
        @echo "Compiling $<"
        @$(CC) $(FLAGS) -c $< -D$*_init=samba_init_module

-
 install: default
        $(INSTALLCMD) -d $(VFS_LIBDIR)
        $(INSTALLCMD) -m 755 *.$(SHLIBEXT) $(VFS_LIBDIR)


-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list