Author: ab Date: 2006-04-12 13:02:56 +0000 (Wed, 12 Apr 2006) New Revision: 15052
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15052 Log: Do not add builddir variants into include paths when building in-tree Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm Changeset: Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm =================================================================== --- branches/SAMBA_4_0/source/build/smb_build/makefile.pm 2006-04-12 12:28:22 UTC (rev 15051) +++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm 2006-04-12 13:02:56 UTC (rev 15052) @@ -10,6 +10,7 @@ use strict; use base 'smb_build::env'; +use Cwd 'abs_path'; sub new($$$) { @@ -103,6 +104,7 @@ 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 @@ } $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 @@ 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}