[PATCH][SAMBA4] allow separate source and build directories

James Peach jpeach at samba.org
Mon Apr 2 17:44:17 GMT 2007

On Mar 29, 2007, at 12:11 AM, Stefan (metze) Metzmacher wrote:

> Hash: SHA1
> James Peach schrieb:
>> Hi all,
>> Attached is my patch to allow separate build and source directories  
>> for
>> building Samba 4 updated to the Samba4 build system of a few days  
>> ago.
>> Note that this changes only the build, not the test suite.
>> The use case for this is a build script along the lines of this:
> Hi James,
> Would it be possible if you commit that step by step.
> Basicly go through the patch and decide for each hunk if it's possible
> to commit it alone with out breaking something. ( I assume 5-7 commits
> would be fine here)

Done. I'm just going to wait for the build farm to settle a bit, then  
I'm going to do an experimental checking to erplace $* with $< just to  
find out which platforms break. I'll back it out once I get the build  
breakage mail.

> about the $*.c vs. $< I'd like to use somthing like this:
> # Run the configured compiler
> COMPILE = $(CC) `$(PERL) $(srcdir)/script/cflags.pl $@` \
>     $(CFLAGS) $(PICFLAG) -c $(C_SOURCEILE) -o $@
> and in the build/smb_build/makefile.pm code we setup
> C_SOURCE_FILE to $< if srcdir != builddir and otherwise to $*.c
> so that we build fine on BSD with srcdir == builddir

Maybe as a last resort. I think that this would be a bit whacky :)

James Peach | jpeach at samba.org

More information about the samba-technical mailing list