diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-09-07 10:25:55 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:17:51 -0500 |
commit | e0f8a4901415251263d9efc46979ac6bd67864f1 (patch) | |
tree | 7d24dbef31d21b06b5060ade58089dab33c75435 /source4 | |
parent | a46e12d0e07e1630f8ef15aff0f97cb2f1f4c273 (diff) | |
download | samba-e0f8a4901415251263d9efc46979ac6bd67864f1.tar.gz samba-e0f8a4901415251263d9efc46979ac6bd67864f1.tar.bz2 samba-e0f8a4901415251263d9efc46979ac6bd67864f1.zip |
r18214: don't add empty elements
metze
(This used to be commit 9695a4bd530d0f49e6a87c6bb56502c6d2d3bdbd)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/build/smb_build/output.pm | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm index 7accad92da..d617598a7a 100644 --- a/source4/build/smb_build/output.pm +++ b/source4/build/smb_build/output.pm @@ -132,8 +132,22 @@ sub create_output($$) my $elem = $depend->{$_}; next if $elem == $part; - push(@{$part->{PUBLIC_CFLAGS}}, @{$elem->{CPPFLAGS}}) if defined(@{$elem->{CPPFLAGS}}); - push(@{$part->{PUBLIC_CFLAGS}}, $elem->{CFLAGS}) if defined($elem->{CFLAGS}); + if (defined(@{$elem->{CPPFLAGS}})) { + my $count = 0; + foreach (@{$elem->{CPPFLAGS}}) { + $count++; + } + push(@{$part->{PUBLIC_CFLAGS}}, @{$elem->{CPPFLAGS}}) if ($count > 0); + } + + next if not defined($elem->{CFLAGS}); + next if $elem->{CFLAGS} eq ""; + my $found = 0; + foreach my $line (@{$part->{PUBLIC_CFLAGS}}) { + $found = 1 if ($line eq $elem->{CFLAGS}); + } + next if ($found == 1); + push(@{$part->{PUBLIC_CFLAGS}}, $elem->{CFLAGS}); } |