diff options
author | Alexander Bokovoy <ab@samba.org> | 2006-04-11 11:37:52 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:04:03 -0500 |
commit | 9cf41988ff6cf0647ec4850f25415ba66845fd70 (patch) | |
tree | b0af5ecca5db64b45b2ab3bf4a83b4050efa18ee /source4/build/smb_build/makefile.pm | |
parent | 970f7122d9095aa95e0513793f69994e235cb1e0 (diff) | |
download | samba-9cf41988ff6cf0647ec4850f25415ba66845fd70.tar.gz samba-9cf41988ff6cf0647ec4850f25415ba66845fd70.tar.bz2 samba-9cf41988ff6cf0647ec4850f25415ba66845fd70.zip |
r15036: Add out of tree build support and see how buildfarm will respond to make constructs
(This used to be commit 9329854489e2c231ffb7986d39009e0936873c11)
Diffstat (limited to 'source4/build/smb_build/makefile.pm')
-rw-r--r-- | source4/build/smb_build/makefile.pm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 197cbc9551..eab8674ed1 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -122,7 +122,7 @@ CPP=$self->{config}->{CPP} CPPFLAGS=$self->{config}->{CPPFLAGS} CC=$self->{config}->{CC} -CFLAGS=-I\$(srcdir)/include -I\$(srcdir) -I\$(srcdir)/lib -D_SAMBA_BUILD_ -DHAVE_CONFIG_H $self->{config}->{CFLAGS} \$(CPPFLAGS) +CFLAGS=-I\$(builddir)/include -I\$(builddir) -I\$(builddir)/lib -I\$(srcdir)/include -I\$(srcdir) -I\$(srcdir)/lib -D_SAMBA_BUILD_ -DHAVE_CONFIG_H $self->{config}->{CFLAGS} \$(CPPFLAGS) PICFLAG=$self->{config}->{PICFLAG} HOSTCC=$self->{config}->{HOSTCC} @@ -368,8 +368,12 @@ sub Header($$) { my ($self,$ctx) = @_; + my $dir = $ctx->{BASEDIR}; + + $dir =~ s/^\.\///g; + foreach (@{$ctx->{PUBLIC_HEADERS}}) { - push (@{$self->{headers}}, "$ctx->{BASEDIR}/$_"); + push (@{$self->{headers}}, "$dir/$_"); } } @@ -497,7 +501,7 @@ sub ProtoHeader($$) $self->output("$dir/$ctx->{PUBLIC_PROTO_HEADER}: $ctx->{MK_FILE} \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST:.o=.c)\n"); $self->output("\t\@echo \"$comment\"\n"); - $self->output("\t\@\$(PERL) \$(srcdir)/script/mkproto.pl --private=$dir/$ctx->{PRIVATE_PROTO_HEADER} --public=$dir/$ctx->{PUBLIC_PROTO_HEADER} \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST)\n\n"); + $self->output("\t\@\$(PERL) \$(srcdir)/script/mkproto.pl --srcdir=\$(srcdir) --builddir=\$(builddir) --private=$dir/$ctx->{PRIVATE_PROTO_HEADER} --public=$dir/$ctx->{PUBLIC_PROTO_HEADER} \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST)\n\n"); } sub write($$) @@ -542,7 +546,7 @@ endif endif "); } else { - $self->output("include static_deps.mk\n"); + $self->output("include \$(srcdir)/static_deps.mk\n"); } open(MAKEFILE,">$file") || die ("Can't open $file\n"); |