Detect if VFS module is being compiled inside or outside source tree

Richard Sharpe realrichardsharpe at gmail.com
Fri Mar 23 20:53:22 MDT 2012


On Fri, Mar 23, 2012 at 7:43 PM, Richard Sharpe
<realrichardsharpe at gmail.com> wrote:
>> OK, that won't work but this will:
>>
>>        @echo "Compiling $<"
>> -       @$(CC) $(FLAGS) -c $<
>> +       @$(CC) $(FLAGS) -c $< -D$(basename $@)_init=samba_init_module
>
> That change was pushed to master as a15aefea27fffcbf622f7032e5d50628189a49bd
>
> However, it might be that I can get rid of that $(basename $@) ...

Sigh, yes, this is better:

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. at SHLIBEXT@: skel_transparent. at OBJEXT@

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


 install: default



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


More information about the samba-technical mailing list