diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-04-20 07:36:21 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:51:14 -0500 |
commit | 8a33415f115c8e2afd78021370b5203f78e1b2f8 (patch) | |
tree | 78e673735ec1a72d43b099cf3e49f823d68df62b | |
parent | cfb00400df284bb337028d260be0961b994bef5a (diff) | |
download | samba-8a33415f115c8e2afd78021370b5203f78e1b2f8.tar.gz samba-8a33415f115c8e2afd78021370b5203f78e1b2f8.tar.bz2 samba-8a33415f115c8e2afd78021370b5203f78e1b2f8.zip |
r22400: only add srcdir and builddir path if they differ
metze
(This used to be commit 581f33d9200d980e7e407f21e687a2bda2cec615)
-rwxr-xr-x | source4/build/smb_build/cflags.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/build/smb_build/cflags.pm b/source4/build/smb_build/cflags.pm index 7ce3ba3555..e6cdff02cd 100755 --- a/source4/build/smb_build/cflags.pm +++ b/source4/build/smb_build/cflags.pm @@ -15,6 +15,9 @@ sub create_cflags($$$$) open(CFLAGS_TXT,">$file") || die ("Can't open `$file'\n"); + my $src_ne_build = 0; + $src_ne_build = 1 unless ($srcdir eq $builddir); + foreach my $key (values %{$CTX}) { next unless defined ($key->{OBJ_LIST}); @@ -26,7 +29,7 @@ sub create_cflags($$$$) my $cflags = ""; foreach my $flag (@{$key->{FINAL_CFLAGS}}) { my $dir; - if (($dir) = ($flag =~ /^-I([^\/].*)$/)) { + if ($src_ne_build and ($dir) = ($flag =~ /^-I([^\/].*)$/)) { $cflags .= " -I$builddir/$dir"; $cflags .= " -I$srcdir/$dir"; } else { |