1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-07 01:58:28 +03:00

r22400: only add srcdir and builddir path if they differ

metze
This commit is contained in:
Stefan Metzmacher 2007-04-20 07:36:21 +00:00 committed by Gerald (Jerry) Carter
parent cc71fa3496
commit 581f33d920

View File

@ -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 {