summaryrefslogtreecommitdiff
path: root/source4/build/smb_build/cflags.pm
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-09-07 14:00:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:17:52 -0500
commit21aa8c49c7fb2014a7fa4aaea65eba0bb067417b (patch)
tree58a4e9ac971a8170b3cd7631c88eec9fd6311392 /source4/build/smb_build/cflags.pm
parentafe2fde6fd842f86166e48c2d008e8cf040eec72 (diff)
downloadsamba-21aa8c49c7fb2014a7fa4aaea65eba0bb067417b.tar.gz
samba-21aa8c49c7fb2014a7fa4aaea65eba0bb067417b.tar.bz2
samba-21aa8c49c7fb2014a7fa4aaea65eba0bb067417b.zip
r18222: filter out double entries from CFLAGS
metze (This used to be commit 42e70d5a7b9c12527bb49f9c60330706d350cf49)
Diffstat (limited to 'source4/build/smb_build/cflags.pm')
-rwxr-xr-xsource4/build/smb_build/cflags.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/build/smb_build/cflags.pm b/source4/build/smb_build/cflags.pm
index 6dfe4fe94e..71898a582b 100755
--- a/source4/build/smb_build/cflags.pm
+++ b/source4/build/smb_build/cflags.pm
@@ -14,15 +14,18 @@ sub create_cflags($$)
foreach my $key (values %{$CTX}) {
next unless defined ($key->{OBJ_LIST});
- next unless defined ($key->{CFLAGS});
- next if ($key->{CFLAGS} eq "");
+
+ next unless defined ($key->{FINAL_CFLAGS});
+ next unless ($#{$key->{FINAL_CFLAGS}} >= 0);
+
+ my $cflags = join(' ', @{$key->{FINAL_CFLAGS}});
foreach (@{$key->{OBJ_LIST}}) {
my $ofile = $_;
my $dfile = $_;
$dfile =~ s/\.o$/.d/;
$dfile =~ s/\.ho$/.d/;
- print CFLAGS_TXT "$ofile $dfile: CFLAGS+=$key->{CFLAGS}\n";
+ print CFLAGS_TXT "$ofile $dfile: CFLAGS+= $cflags\n";
}
}
close(CFLAGS_TXT);