summaryrefslogtreecommitdiff
path: root/source4/build/smb_build
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2006-04-12 13:02:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:04:04 -0500
commitaaddd93e46d127f054dc843d9247981f181b77ab (patch)
treecd916888851aaed6443de29db471e39694bb89a8 /source4/build/smb_build
parent3c53cb85ceccf4c6e6b1c5247755ef81b48d487a (diff)
downloadsamba-aaddd93e46d127f054dc843d9247981f181b77ab.tar.gz
samba-aaddd93e46d127f054dc843d9247981f181b77ab.tar.bz2
samba-aaddd93e46d127f054dc843d9247981f181b77ab.zip
r15052: Do not add builddir variants into include paths when building in-tree
(This used to be commit 2e2a33ce3f72164a4ed16a81025dc55a55f5e465)
Diffstat (limited to 'source4/build/smb_build')
-rw-r--r--source4/build/smb_build/makefile.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index eab8674ed1..c6ab0d7220 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -10,6 +10,7 @@ use smb_build::env;
use strict;
use base 'smb_build::env';
+use Cwd 'abs_path';
sub new($$$)
{
@@ -103,6 +104,7 @@ sub _prepare_compiler_linker($)
my $devld_local = "";
my $devld_install = "";
+ my $builddir_headers = "";
$self->{duplicate_build} = 0;
if ($self->{config}->{LIBRARY_OUTPUT_TYPE} eq "SHARED_LIBRARY") {
@@ -112,6 +114,10 @@ sub _prepare_compiler_linker($)
}
$devld_install = " -Wl,-rpath-link,\$(builddir)/bin";
}
+
+ if (!(abs_path($self->{config}->{srcdir}) eq abs_path($self->{config}->{builddir}))) {
+ $builddir_headers= "-I\$(builddir)/include -I\$(builddir) -I\$(builddir)/lib ";
+ }
$self->output(<< "__EOD__"
SHELL=$self->{config}->{SHELL}
@@ -122,7 +128,7 @@ CPP=$self->{config}->{CPP}
CPPFLAGS=$self->{config}->{CPPFLAGS}
CC=$self->{config}->{CC}
-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)
+CFLAGS=$builddir_headers-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}