s4:build: try to fix the build with the ibm checker in the build-farm
[ira/wip.git] / source4 / build / smb_build / main.pl
index b31bfaa1f22650aec02d7afd3dd4ae007f88dab4..0d19e418270a0344925d64803fe3cf1e4b1526c7 100644 (file)
@@ -31,16 +31,18 @@ my $mkfile = smb_build::config_mk::run_config_mk($INPUT, $config::config{srcdir}
 my $subsys_output_type = ["MERGED_OBJ"];
 
 my $library_output_type;
-if ($config::config{USESHARED} eq "true") {
-       $library_output_type = ["SHARED_LIBRARY", "STATIC_LIBRARY"];
+my $useshared = (defined($ENV{USESHARED})?$ENV{USESHARED}:$config::config{USESHARED});
+
+if ($useshared eq "true") {
+       $library_output_type = ["SHARED_LIBRARY", "MERGED_OBJ"];
 } else {
-       $library_output_type = ["STATIC_LIBRARY"];
+       $library_output_type = ["MERGED_OBJ"];
        push (@$library_output_type, "SHARED_LIBRARY") if 
                                                ($config::config{BLDSHARED} eq "true")
 }
 
 my $module_output_type;
-if ($config::config{USESHARED} eq "true") {
+if ($useshared eq "true") {
        $module_output_type = ["SHARED_LIBRARY"];
 } else {
        $module_output_type = ["MERGED_OBJ"];
@@ -70,9 +72,8 @@ foreach my $key (values %$OUTPUT) {
            ${$key->{OUTPUT_TYPE}}[0] eq "SHARED_LIBRARY") {
                $shared_libs_used = 1;
        }
-       $mkenv->PythonFiles($key) if defined($key->{PYTHON_FILES});
        if ($key->{TYPE} eq "MODULE" and @{$key->{OUTPUT_TYPE}}[0] eq "MERGED_OBJ" and defined($key->{INIT_FUNCTION})) {
-               $mkenv->output("$key->{SUBSYSTEM}_INIT_FUNCTIONS += $key->{INIT_FUNCTION},\n");
+               $mkenv->output("$key->{SUBSYSTEM}_INIT_FUNCTIONS +=$key->{INIT_FUNCTION},\n");
        }
        $mkenv->CFlags($key);
 }