diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-06-05 16:37:27 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:17:40 -0500 |
commit | 38e3381b1b99d69529543d2e9b38761143f1a22f (patch) | |
tree | 48f3909df27d3ef91d29fea33fe6c5310b6a5fd8 /source4/build/smb_build/output.pm | |
parent | 524f3c47cd38d4957a1fdb6ae66a7847f0deb80d (diff) | |
download | samba-38e3381b1b99d69529543d2e9b38761143f1a22f.tar.gz samba-38e3381b1b99d69529543d2e9b38761143f1a22f.tar.bz2 samba-38e3381b1b99d69529543d2e9b38761143f1a22f.zip |
r7308: Make dependency lists in the Makefile shorter (see discussion on samba-technical)
(This used to be commit 71d62d4dc7c475d17042ca466e56c51da1a2f32e)
Diffstat (limited to 'source4/build/smb_build/output.pm')
-rw-r--r-- | source4/build/smb_build/output.pm | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm index 398cb31ee9..2a19adb94c 100644 --- a/source4/build/smb_build/output.pm +++ b/source4/build/smb_build/output.pm @@ -22,7 +22,7 @@ sub generate_shared_library($) { my $lib = shift; - @{$lib->{DEPEND_LIST}} = ("\$($lib->{TYPE}_$lib->{NAME}\_OBJS)"); + @{$lib->{DEPEND_LIST}} = (); @{$lib->{LINK_LIST}} = ("\$($lib->{TYPE}_$lib->{NAME}\_OBJS)"); $lib->{LIBRARY_NAME} = lc($lib->{NAME}).".so"; $lib->{TARGET} = "bin/lib$lib->{LIBRARY_NAME}"; @@ -39,7 +39,7 @@ sub generate_static_library($) { my $lib = shift; - @{$lib->{DEPEND_LIST}} = ("\$($lib->{TYPE}_$lib->{NAME}\_OBJS)"); + @{$lib->{DEPEND_LIST}} = (); $lib->{LIBRARY_NAME} = lc($lib->{NAME}).".a"; @{$lib->{LINK_LIST}} = ("\$($lib->{TYPE}_$lib->{NAME}\_OBJS)"); @@ -53,7 +53,7 @@ sub generate_binary($) { my $bin = shift; - @{$bin->{DEPEND_LIST}} = ("\$($bin->{TYPE}_$bin->{NAME}\_OBJS)"); + @{$bin->{DEPEND_LIST}} = (); @{$bin->{LINK_LIST}} = ("\$($bin->{TYPE}_$bin->{NAME}\_OBJS)"); @{$bin->{LINK_FLAGS}} = (); @@ -64,13 +64,12 @@ sub generate_binary($) sub create_output($) { my $depend = shift; - my %output = (); my $part; $depend->{PROTO}{OUTPUT_TYPE} = "OBJLIST"; $depend->{PROTO}{TYPE} = "PROTO"; $depend->{PROTO}{NAME} = "PROTO"; - + foreach $part (values %{$depend}) { next if not defined($part->{OUTPUT_TYPE}); @@ -90,13 +89,17 @@ sub create_output($) foreach $part (values %{$depend}) { next if not defined($part->{OUTPUT_TYPE}); + foreach (@{$part->{DEPENDENCIES}}) { + my $elem = $$_; + push(@{$part->{DEPEND_LIST}}, $elem->{TARGET}) if defined($elem->{TARGET}); + } + # Always import the CFLAGS and CPPFLAGS of the unique dependencies foreach my $elem (values %{$part->{UNIQUE_DEPENDENCIES}}) { next if $elem == $part; push(@{$part->{CPPFLAGS}}, @{$elem->{CPPFLAGS}}) if defined(@{$elem->{CPPFLAGS}}); push(@{$part->{CFLAGS}}, @{$elem->{CFLAGS}}) if defined(@{$elem->{CFLAGS}}); - push(@{$part->{DEPEND_LIST}}, $elem->{TARGET}) if defined($elem->{TARGET}); push(@{$part->{LINK_LIST}}, $elem->{OUTPUT}) if defined($elem->{OUTPUT}); push(@{$part->{LINK_FLAGS}}, @{$elem->{LIBS}}) if defined($elem->{LIBS}); push(@{$part->{LINK_FLAGS}},@{$elem->{LDFLAGS}}) if defined($elem->{LDFLAGS}); |