diff options
Diffstat (limited to 'source4/build/smb_build')
-rw-r--r-- | source4/build/smb_build/input.pm | 34 | ||||
-rw-r--r-- | source4/build/smb_build/main.pl | 10 | ||||
-rw-r--r-- | source4/build/smb_build/output.pm | 3 |
3 files changed, 23 insertions, 24 deletions
diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm index 88d7c24af8..5dcbb8c904 100644 --- a/source4/build/smb_build/input.pm +++ b/source4/build/smb_build/input.pm @@ -10,10 +10,11 @@ use strict; package smb_build::input; -use vars qw($library_output_type $subsystem_output_type); +use vars qw($library_output_type $subsystem_output_type $module_output_type); $library_output_type = "OBJ_LIST"; $subsystem_output_type = "OBJ_LIST"; +$module_output_type = "OBJ_LIST"; my $srcdir = "."; sub strtrim($) @@ -54,43 +55,32 @@ 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; if (!(defined($INPUT->{$mod->{SUBSYSTEM}}))) { - $mod->{BUILD} = "NOT"; $mod->{ENABLE} = "NO"; return; } - 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") + if ($mod->{ENABLE} ne "YES") { - $mod->{CHOSEN_BUILD} = "NOT"; + printf("Module `%s' disabled\n",$mod->{NAME}); + return; } - if (not defined($mod->{CHOSEN_BUILD}) or $mod->{CHOSEN_BUILD} eq "DEFAULT") + if (defined($mod->{CHOSEN_BUILD}) and $mod->{CHOSEN_BUILD} ne "DEFAULT") { - $mod->{CHOSEN_BUILD} = $mod->{DEFAULT_BUILD}; + $mod->{OUTPUT_TYPE} = $mod->{CHOSEN_BUILD}; + } else { + $mod->{OUTPUT_TYPE} = $module_output_type; } - if ($mod->{CHOSEN_BUILD} eq "SHARED") { - $mod->{ENABLE} = "YES"; - $mod->{OUTPUT_TYPE} = "SHARED_LIBRARY"; + if ($mod->{OUTPUT_TYPE} eq "SHARED_LIBRARY" or + $mod->{OUTPUT_TYPE} eq "STATIC_LIBRARY") { $mod->{INSTALLDIR} = "LIBDIR/$mod->{SUBSYSTEM}"; push (@{$mod->{REQUIRED_SUBSYSTEMS}}, $mod->{SUBSYSTEM}); - } elsif ($mod->{CHOSEN_BUILD} eq "STATIC") { - $mod->{ENABLE} = "YES"; - push (@{$INPUT->{$mod->{SUBSYSTEM}}{REQUIRED_SUBSYSTEMS}}, $mod->{NAME}); - $mod->{OUTPUT_TYPE} = $subsystem_output_type; } else { - $mod->{ENABLE} = "NO"; - printf("Module `%s' disabled\n",$mod->{NAME}); - return; + push (@{$INPUT->{$mod->{SUBSYSTEM}}{REQUIRED_SUBSYSTEMS}}, $mod->{NAME}); } } diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl index a207062d34..1bc4d45aaa 100644 --- a/source4/build/smb_build/main.pl +++ b/source4/build/smb_build/main.pl @@ -37,6 +37,16 @@ if (defined($ENV{"LIBRARY_OUTPUT_TYPE"})) { $smb_build::input::library_output_type = "MERGEDOBJ"; } +if (defined($ENV{"MODULE_OUTPUT_TYPE"})) { + $smb_build::input::module_output_type = $ENV{MODULE_OUTPUT_TYPE}; +} elsif ($config::config{BLDSHARED} eq "true") { + #FIXME: This should eventually become SHARED_LIBRARY + # rather then MERGEDOBJ once I'm certain it works ok -- jelmer + $smb_build::input::module_output_type = "MERGEDOBJ"; +} elsif ($config::config{BLDMERGED} eq "true") { + $smb_build::input::module_output_type = "MERGEDOBJ"; +} + my $DEPEND = smb_build::input::check($INPUT, \%config::enabled); my $OUTPUT = output::create_output($DEPEND); my $mkenv = new smb_build::makefile(\%config::config, $mkfile); diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm index 2dc74562f6..d7618766f6 100644 --- a/source4/build/smb_build/output.pm +++ b/source4/build/smb_build/output.pm @@ -161,9 +161,8 @@ sub create_output($) push(@{$part->{DEPEND_LIST}}, $elem->{TARGET}) if defined($elem->{TARGET}); } push(@{$part->{SUBSYSTEM_INIT_FUNCTIONS}}, $elem->{INIT_FUNCTION}) if - $part->{OUTPUT_TYPE} eq "BINARY" and + #$part->{OUTPUT_TYPE} eq "BINARY" and defined($elem->{INIT_FUNCTION}) and - $elem->{INIT_FUNCTION} ne "" and $part->{OUTPUT_TYPE} ne "SHARED_LIBRARY"; } } |