diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-07-28 11:51:37 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:30:09 -0500 |
commit | 930e624d816a175d5ca4448e6ed40bc7dd8ec5b7 (patch) | |
tree | cefd60a954d828902c8fde6a6e8a69954e0baa63 /source4/build/smb_build/input.pm | |
parent | d0496a4ee626f829f1b5032122d2daf53e0bd2e2 (diff) | |
download | samba-930e624d816a175d5ca4448e6ed40bc7dd8ec5b7.tar.gz samba-930e624d816a175d5ca4448e6ed40bc7dd8ec5b7.tar.bz2 samba-930e624d816a175d5ca4448e6ed40bc7dd8ec5b7.zip |
r8826: Make configure generate config.mk files (with the external libraries
that were found) and a config.pm file (with all substitution variables)
(This used to be commit 52bb1374bbcfc9b9a6d098687bafe9021a1ee858)
Diffstat (limited to 'source4/build/smb_build/input.pm')
-rw-r--r-- | source4/build/smb_build/input.pm | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm index d469550a76..fc14c1d2e9 100644 --- a/source4/build/smb_build/input.pm +++ b/source4/build/smb_build/input.pm @@ -8,7 +8,7 @@ ########################################################### use strict; -package input; +package smb_build::input; my $subsystem_default_output_type = "OBJLIST"; my $srcdir = "."; @@ -51,6 +51,7 @@ sub check_module($$) die("Module $mod->{NAME} does not have a SUBSYSTEM set") if not defined($mod->{SUBSYSTEM}); + ($mod->{DEFAULT_BUILD} = "STATIC") if not defined($mod->{DEFAULT_BUILD}); my $use_default = 0; @@ -62,12 +63,17 @@ sub check_module($$) return; } - if ($mod->{ENABLE} ne "YES") + if (($mod->{ENABLE} eq "STATIC") or + ($mod->{ENABLE} eq "NOT") or + ($mod->{ENABLE} eq "SHARED")) { + $mod->{DEFAULT_BUILD} = $mod->{ENABLE}; + } elsif ($mod->{ENABLE} ne "YES") { $mod->{CHOSEN_BUILD} = "NOT"; } - if (not defined($mod->{CHOSEN_BUILD}) or $mod->{CHOSEN_BUILD} eq "DEFAULT") { + if (not defined($mod->{CHOSEN_BUILD}) or $mod->{CHOSEN_BUILD} eq "DEFAULT") + { $mod->{CHOSEN_BUILD} = $mod->{DEFAULT_BUILD}; } @@ -145,14 +151,22 @@ sub calc_unique_deps($$) # check_input($INPUT) # # $INPUT - the global INPUT context -sub check($) +# $enabled - list of enabled subsystems/libs +sub check($$) { - my $INPUT = shift; + my ($INPUT, $enabled) = @_; ($subsystem_default_output_type = $ENV{SUBSYSTEM_OUTPUT_TYPE}) if (defined($ENV{"SUBSYSTEM_OUTPUT_TYPE"})); foreach my $part (values %$INPUT) { - ($part->{ENABLE} = "YES") if not defined($part->{ENABLE}); + if (defined($enabled->{$part->{NAME}})) { + $part->{ENABLE} = $enabled->{$part->{NAME}}; + next; + } + + unless(defined($part->{ENABLE})) { + $part->{ENABLE} = "YES"; + } } foreach my $k (keys %$INPUT) { @@ -166,12 +180,6 @@ sub check($) check_library($INPUT, $part) if ($part->{TYPE} eq "LIBRARY"); check_binary($INPUT, $part) if ($part->{TYPE} eq "BINARY"); check_target($INPUT, $part) if ($part->{TYPE} eq "TARGET"); - - #FIXME: REQUIRED_LIBRARIES needs to go - if (defined($part->{REQUIRED_LIBRARIES})) { - push(@{$part->{REQUIRED_SUBSYSTEMS}}, @{$part->{REQUIRED_LIBRARIES}}); - delete ($part->{REQUIRED_LIBRARIES}); - } } my %depend = %$INPUT; |