From 9cf41988ff6cf0647ec4850f25415ba66845fd70 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Tue, 11 Apr 2006 11:37:52 +0000 Subject: r15036: Add out of tree build support and see how buildfarm will respond to make constructs (This used to be commit 9329854489e2c231ffb7986d39009e0936873c11) --- source4/build/smb_build/makefile.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source4/build/smb_build/makefile.pm') 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"); -- cgit