summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/m4/rewrite.m42
-rw-r--r--source4/build/smb_build/config_mk.pm13
-rw-r--r--source4/build/smb_build/core.m45
-rw-r--r--source4/build/smb_build/depend.pm3
-rw-r--r--source4/build/smb_build/dump.pm (renamed from source4/build/smb_build/dump.pl)10
-rw-r--r--source4/build/smb_build/input.pm5
-rw-r--r--source4/build/smb_build/main.pm13
-rw-r--r--source4/build/smb_build/makefile.pm3
-rw-r--r--source4/build/smb_build/output.pm3
-rw-r--r--source4/build/smb_build/public.m482
-rw-r--r--source4/build/smb_build/smb_build_h.pm3
11 files changed, 81 insertions, 61 deletions
diff --git a/source4/build/m4/rewrite.m4 b/source4/build/m4/rewrite.m4
index 7a24a11a5c..752199e41d 100644
--- a/source4/build/m4/rewrite.m4
+++ b/source4/build/m4/rewrite.m4
@@ -665,7 +665,7 @@ fi
SMB_INFO_BUILD_ENV="$SMB_INFO_BUILD_ENV
#############################################
# Start Tell the Linker to export all symbols
-@{\$SMB_BUILD_CTX->{BUILD_ENV}{LD}{DYNEXP}} = str2array(\"$DYNEXP\");
+@{\$SMB_BUILD_CTX->{BUILD_ENV}{LD}{DYNEXP}} = input::str2array(\"$DYNEXP\");
# End Tell the Linker to export all symbols
#############################################
"
diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm
index eaf7079352..f852e345ac 100644
--- a/source4/build/smb_build/config_mk.pm
+++ b/source4/build/smb_build/config_mk.pm
@@ -6,6 +6,11 @@
### Released under the GNU GPL ###
###########################################################
+package config_mk;
+use input;
+
+use strict;
+
###########################################################
# The parsing function which parses the file
#
@@ -188,9 +193,9 @@ sub _fetch_var_from_config_mk($$$)
}
if (defined($result->{$section}{$key})) {
- $val = strtrim($result->{$section}{$key}{VAL});
+ $val = input::strtrim($result->{$section}{$key}{VAL});
} elsif (defined($result->{DEFAULT}{$key})) {
- $val = strtrim($result->{DEFAULT}{$key}{VAL});
+ $val = input::strtrim($result->{DEFAULT}{$key}{VAL});
}
return $val;
@@ -225,9 +230,9 @@ sub _fetch_array_from_config_mk($$$)
}
if (defined($result->{$section}{$key})) {
- @val = str2array($result->{$section}{$key}{VAL});
+ @val = input::str2array($result->{$section}{$key}{VAL});
} elsif (defined($result->{DEFAULT}{$key})) {
- @val = str2array($result->{DEFAULT}{$key}{VAL});
+ @val = input::str2array($result->{DEFAULT}{$key}{VAL});
}
return @val;
diff --git a/source4/build/smb_build/core.m4 b/source4/build/smb_build/core.m4
index 8f0959208c..c5a5d8502e 100644
--- a/source4/build/smb_build/core.m4
+++ b/source4/build/smb_build/core.m4
@@ -70,11 +70,6 @@ smb_build_main(\$SMB_BUILD_CTX);
_SMB_ACEOF
-if test x"$developer" = x"yes";then
- echo "#line 1 \"build/smb_build/dump.pl\"" >> config.smb_build.pl
- cat >> config.smb_build.pl < build/smb_build/dump.pl
-fi
-
$PERL ./config.smb_build.pl || exit $?
])
diff --git a/source4/build/smb_build/depend.pm b/source4/build/smb_build/depend.pm
index 771a83ca2c..53ee5136de 100644
--- a/source4/build/smb_build/depend.pm
+++ b/source4/build/smb_build/depend.pm
@@ -6,6 +6,9 @@
### Released under the GNU GPL ###
###########################################################
+package depend;
+use strict;
+
###########################################################
# This function resolves the dependencies
# for the SUBSYSTEMS_LIST
diff --git a/source4/build/smb_build/dump.pl b/source4/build/smb_build/dump.pm
index e4ee3ceea2..9a751e3563 100644
--- a/source4/build/smb_build/dump.pl
+++ b/source4/build/smb_build/dump.pm
@@ -6,8 +6,12 @@
### Released under the GNU GPL ###
###########################################################
+package dump;
+use strict;
+
use Data::Dumper;
-sub _dump_ctx($)
+
+sub dump_ctx($)
{
my $ctx = shift;
@@ -16,8 +20,6 @@ sub _dump_ctx($)
print DUMP Dumper($ctx);
close(DUMP);
-
- return;
}
-_dump_ctx($SMB_BUILD_CTX);
+1;
diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm
index d3737ea7d1..a6d5b25f41 100644
--- a/source4/build/smb_build/input.pm
+++ b/source4/build/smb_build/input.pm
@@ -6,6 +6,9 @@
### Released under the GNU GPL ###
###########################################################
+use strict;
+package input;
+
sub strtrim($)
{
my $str = shift;
@@ -123,7 +126,7 @@ sub _check_binaries($)
# check_input($SMB_BUILD_CTX)
#
# $SMB_BUILD_CTX - the global SMB_BUILD context
-sub check_input($)
+sub check($)
{
my $CTX = shift;
diff --git a/source4/build/smb_build/main.pm b/source4/build/smb_build/main.pm
index 4df7be7dae..b84f4fd8be 100644
--- a/source4/build/smb_build/main.pm
+++ b/source4/build/smb_build/main.pm
@@ -12,20 +12,23 @@ use smb_build_h;
use input;
use config_mk;
use output;
+use dump;
use strict;
sub smb_build_main($)
{
my $SMB_BUILD_CTX = shift;
- check_input($SMB_BUILD_CTX);
+ input::check($SMB_BUILD_CTX);
- create_depend($SMB_BUILD_CTX);
+ depend::create_depend($SMB_BUILD_CTX);
- create_output($SMB_BUILD_CTX);
+ output::create_output($SMB_BUILD_CTX);
- create_makefile_in($SMB_BUILD_CTX);
+ makefile::create_makefile_in($SMB_BUILD_CTX);
- create_smb_build_h($SMB_BUILD_CTX);
+ smb_build_h::create_smb_build_h($SMB_BUILD_CTX);
+
+ dump::dump_ctx($SMB_BUILD_CTX);
return 0;
}
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 0e0da317f5..96225de0ba 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -6,6 +6,9 @@
### Released under the GNU GPL ###
###########################################################
+package makefile;
+use strict;
+
sub _prepare_command_interpreters($)
{
my $ctx = shift;
diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm
index 42b4403e73..0b82a2746b 100644
--- a/source4/build/smb_build/output.pm
+++ b/source4/build/smb_build/output.pm
@@ -6,6 +6,9 @@
### Released under the GNU GPL ###
###########################################################
+package output;
+use strict;
+
sub _generate_ext_libs($)
{
my $CTX = shift;
diff --git a/source4/build/smb_build/public.m4 b/source4/build/smb_build/public.m4
index 74e54b0a0e..9994876dc8 100644
--- a/source4/build/smb_build/public.m4
+++ b/source4/build/smb_build/public.m4
@@ -213,10 +213,10 @@ SMB_INFO_MODULES="$SMB_INFO_MODULES
\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{NAME} = \"$1\";
\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{SUBSYSTEM} = \"$2\";
\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{DEFAULT_BUILD} = \"$[SMB_MODULE_DEFAULT_][$1]\";
-@{\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{INIT_OBJ_FILES}} = str2array(\"$4\");
-@{\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{ADD_OBJ_FILES}} = str2array(\"$5\");
-@{\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{REQUIRED_LIBRARIES}} = str2array(\"$6\");
-@{\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{REQUIRED_SUBSYSTEMS}} = str2array(\"$7\");
+@{\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{INIT_OBJ_FILES}} = input::str2array(\"$4\");
+@{\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{ADD_OBJ_FILES}} = input::str2array(\"$5\");
+@{\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{REQUIRED_LIBRARIES}} = input::str2array(\"$6\");
+@{\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{REQUIRED_SUBSYSTEMS}} = input::str2array(\"$7\");
\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{INIT_FUNCTION} = \"\";
#
\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{CHOSEN_BUILD} = \"$[SMB_MODULE_][$1]\";
@@ -252,11 +252,11 @@ SMB_INFO_MODULES="$SMB_INFO_MODULES
\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{NAME} = \"$1\";
\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{SUBSYSTEM} = \"$2\";
\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{DEFAULT_BUILD} = \"$[SMB_MODULE_DEFAULT_][$1]\";
-@{\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{INIT_OBJ_FILES}} = module_get_array(\"$4\", \"$1\", \"INIT_OBJ_FILES\");
-@{\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{ADD_OBJ_FILES}} = module_get_array(\"$4\", \"$1\", \"ADD_OBJ_FILES\");
-@{\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{REQUIRED_LIBRARIES}} = module_get_array(\"$4\", \"$1\", \"REQUIRED_LIBRARIES\");
-@{\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{REQUIRED_SUBSYSTEMS}} = module_get_array(\"$4\", \"$1\", \"REQUIRED_SUBSYSTEMS\");
-\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{INIT_FUNCTION} = module_get_var(\"$4\", \"$1\", \"INIT_FUNCTION\");
+@{\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{INIT_OBJ_FILES}} = config_mk::module_get_array(\"$4\", \"$1\", \"INIT_OBJ_FILES\");
+@{\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{ADD_OBJ_FILES}} = config_mk::module_get_array(\"$4\", \"$1\", \"ADD_OBJ_FILES\");
+@{\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{REQUIRED_LIBRARIES}} = config_mk::module_get_array(\"$4\", \"$1\", \"REQUIRED_LIBRARIES\");
+@{\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{REQUIRED_SUBSYSTEMS}} = config_mk::module_get_array(\"$4\", \"$1\", \"REQUIRED_SUBSYSTEMS\");
+\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{INIT_FUNCTION} = config_mk::module_get_var(\"$4\", \"$1\", \"INIT_FUNCTION\");
#
\$SMB_BUILD_CTX->{INPUT}{MODULES}{$1}{CHOSEN_BUILD} = \"$[SMB_MODULE_][$1]\";
# End MODULE $1
@@ -303,11 +303,11 @@ SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
###################################
# Start Subsystem $1
\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{NAME} = \"$1\";
-@{\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{INIT_OBJ_FILES}} = str2array(\"$2\");
-@{\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{ADD_OBJ_FILES}} = str2array(\"$3\");
+@{\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{INIT_OBJ_FILES}} = input::str2array(\"$2\");
+@{\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{ADD_OBJ_FILES}} = input::str2array(\"$3\");
\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{INIT_FUNCTION} = \"\";
-@{\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{REQUIRED_LIBRARIES}} = str2array(\"$4\");
-@{\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{REQUIRED_SUBSYSTEMS}} = str2array(\"$5\");
+@{\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{REQUIRED_LIBRARIES}} = input::str2array(\"$4\");
+@{\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{REQUIRED_SUBSYSTEMS}} = input::str2array(\"$5\");
#
\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{ENABLE} = \"$[SMB_SUBSYSTEM_ENABLE_][$1]\";
\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{NOPROTO} = \"$[SMB_SUBSYSTEM_NOPROTO_][$1]\";
@@ -335,11 +335,11 @@ SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
###################################
# Start Subsystem $1
\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{NAME} = \"$1\";
-@{\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{INIT_OBJ_FILES}} = subsystem_get_array(\"$2\", \"$1\", \"INIT_OBJ_FILES\");
-@{\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{ADD_OBJ_FILES}} = subsystem_get_array(\"$2\", \"$1\", \"ADD_OBJ_FILES\");
-@{\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{REQUIRED_LIBRARIES}} = subsystem_get_array(\"$2\", \"$1\", \"REQUIRED_LIBRARIES\");
-@{\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{REQUIRED_SUBSYSTEMS}} = subsystem_get_array(\"$2\", \"$1\", \"REQUIRED_SUBSYSTEMS\");
-\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{INIT_FUNCTION} = subsystem_get_var(\"$2\", \"$1\", \"INIT_FUNCTION\");
+@{\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{INIT_OBJ_FILES}} = config_mk::subsystem_get_array(\"$2\", \"$1\", \"INIT_OBJ_FILES\");
+@{\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{ADD_OBJ_FILES}} = config_mk::subsystem_get_array(\"$2\", \"$1\", \"ADD_OBJ_FILES\");
+@{\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{REQUIRED_LIBRARIES}} = config_mk::subsystem_get_array(\"$2\", \"$1\", \"REQUIRED_LIBRARIES\");
+@{\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{REQUIRED_SUBSYSTEMS}} = config_mk::subsystem_get_array(\"$2\", \"$1\", \"REQUIRED_SUBSYSTEMS\");
+\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{INIT_FUNCTION} = config_mk::subsystem_get_var(\"$2\", \"$1\", \"INIT_FUNCTION\");
#
\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{ENABLE} = \"$[SMB_SUBSYSTEM_ENABLE_][$1]\";
\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{NOPROTO} = \"$[SMB_SUBSYSTEM_NOPROTO_][$1]\";
@@ -423,10 +423,10 @@ SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
###################################
# Start Ext Lib $1
\$SMB_BUILD_CTX->{INPUT}{EXT_LIBS}{$1}{NAME} = \"$1\";
-@{\$SMB_BUILD_CTX->{INPUT}{EXT_LIBS}{$1}{LIBS}} = str2array(\"$2\");
-@{\$SMB_BUILD_CTX->{INPUT}{EXT_LIBS}{$1}{CFLAGS}} = str2array(\"$3\");
-@{\$SMB_BUILD_CTX->{INPUT}{EXT_LIBS}{$1}{CPPFLAGS}} = str2array(\"$4\");
-@{\$SMB_BUILD_CTX->{INPUT}{EXT_LIBS}{$1}{LDFLAGS}} = str2array(\"$5\");
+@{\$SMB_BUILD_CTX->{INPUT}{EXT_LIBS}{$1}{LIBS}} = input::str2array(\"$2\");
+@{\$SMB_BUILD_CTX->{INPUT}{EXT_LIBS}{$1}{CFLAGS}} = input::str2array(\"$3\");
+@{\$SMB_BUILD_CTX->{INPUT}{EXT_LIBS}{$1}{CPPFLAGS}} = input::str2array(\"$4\");
+@{\$SMB_BUILD_CTX->{INPUT}{EXT_LIBS}{$1}{LDFLAGS}} = input::str2array(\"$5\");
#
\$SMB_BUILD_CTX->{INPUT}{EXT_LIBS}{$1}{ENABLE} = \"$[SMB_EXT_LIB_ENABLE_][$1]\";
# End Ext Lib $1
@@ -467,9 +467,9 @@ SMB_INFO_LIBRARIES="$SMB_INFO_LIBRARIES
\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{MAJOR_VERSION} = \"$2\";
\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{MINOR_VERSION} = \"$3\";
\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{RELEASE_VERSION} = \"$4\";
-@{\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{OBJ_FILES}} = str2array(\"$5\");
-@{\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{REQUIRED_LIBRARIES}} = str2array(\"$6\");
-@{\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{REQUIRED_SUBSYSTEMS}} = str2array(\"$7\");
+@{\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{OBJ_FILES}} = input::str2array(\"$5\");
+@{\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{REQUIRED_LIBRARIES}} = input::str2array(\"$6\");
+@{\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{REQUIRED_SUBSYSTEMS}} = input::str2array(\"$7\");
#
\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{ENABLE} = \"$[SMB_LIBRARY_ENABLE_][$1]\";
# End Library $1
@@ -492,12 +492,12 @@ SMB_INFO_LIBRARIES="$SMB_INFO_LIBRARIES
###################################
# Start Library $1
\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{NAME} = \"$1\";
-\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{MAJOR_VERSION} = library_get_var(\"$2\", \"$1\", \"MAJOR_VERSION\");
-\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{MINOR_VERSION} = library_get_var(\"$2\", \"$1\", \"MINOR_VERSION\");
-\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{RELEASE_VERSION} = library_get_var(\"$2\", \"$1\", \"RELEASE_VERSION\");
-@{\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{OBJ_FILES}} = library_get_array(\"$2\", \"$1\", \"OBJ_FILES\");
-@{\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{REQUIRED_LIBRARIES}} = library_get_array(\"$2\", \"$1\", \"REQUIRED_LIBRARIES\");
-@{\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{REQUIRED_SUBSYSTEMS}} = library_get_array(\"$2\", \"$1\", \"REQUIRED_SUBSYSTEMS\");
+\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{MAJOR_VERSION} = config_mk::library_get_var(\"$2\", \"$1\", \"MAJOR_VERSION\");
+\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{MINOR_VERSION} = config_mk::library_get_var(\"$2\", \"$1\", \"MINOR_VERSION\");
+\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{RELEASE_VERSION} = config_mk::library_get_var(\"$2\", \"$1\", \"RELEASE_VERSION\");
+@{\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{OBJ_FILES}} = config_mk::library_get_array(\"$2\", \"$1\", \"OBJ_FILES\");
+@{\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{REQUIRED_LIBRARIES}} = config_mk::library_get_array(\"$2\", \"$1\", \"REQUIRED_LIBRARIES\");
+@{\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{REQUIRED_SUBSYSTEMS}} = config_mk::library_get_array(\"$2\", \"$1\", \"REQUIRED_SUBSYSTEMS\");
#
\$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$1}{ENABLE} = \"$[SMB_LIBRARY_ENABLE_][$1]\";
# End Library $1
@@ -533,11 +533,11 @@ SMB_INFO_BINARIES="$SMB_INFO_BINARIES
###################################
# Start Binary $1
\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{NAME} = \"$1\";
-@{\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{BUILD_TARGETS}} = str2array(\"$2\");
-@{\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{INSTALL_PATH}} = str2array(\"$3\");
-@{\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{OBJ_FILES}} = str2array(\"$4\");
-@{\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{REQUIRED_LIBRARIES}} = str2array(\"$5\");
-@{\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{REQUIRED_SUBSYSTEMS}} = str2array(\"$6\");
+@{\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{BUILD_TARGETS}} = input::str2array(\"$2\");
+@{\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{INSTALL_PATH}} = input::str2array(\"$3\");
+@{\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{OBJ_FILES}} = input::str2array(\"$4\");
+@{\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{REQUIRED_LIBRARIES}} = input::str2array(\"$5\");
+@{\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{REQUIRED_SUBSYSTEMS}} = input::str2array(\"$6\");
#
\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{ENABLE} = \"$[SMB_BINARY_ENABLE_][$1]\";
# End Binary $1
@@ -560,11 +560,11 @@ SMB_INFO_BINARIES="$SMB_INFO_BINARIES
###################################
# Start Binary $1
\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{NAME} = \"$1\";
-@{\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{BUILD_TARGETS}} = binary_get_array(\"$2\", \"$1\", \"BUILD_TARGETS\");
-@{\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{INSTALL_PATH}} = binary_get_array(\"$2\", \"$1\", \"INSTALL_PATH\");
-@{\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{OBJ_FILES}} = binary_get_array(\"$2\", \"$1\", \"OBJ_FILES\");
-@{\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{REQUIRED_LIBRARIES}} = binary_get_array(\"$2\", \"$1\",\"REQUIRED_LIBRARIES\");
-@{\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{REQUIRED_SUBSYSTEMS}} = binary_get_array(\"$2\", \"$1\",\"REQUIRED_SUBSYSTEMS\");
+@{\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{BUILD_TARGETS}} = config_mk::binary_get_array(\"$2\", \"$1\", \"BUILD_TARGETS\");
+@{\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{INSTALL_PATH}} = config_mk::binary_get_array(\"$2\", \"$1\", \"INSTALL_PATH\");
+@{\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{OBJ_FILES}} = config_mk::binary_get_array(\"$2\", \"$1\", \"OBJ_FILES\");
+@{\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{REQUIRED_LIBRARIES}} = config_mk::binary_get_array(\"$2\", \"$1\",\"REQUIRED_LIBRARIES\");
+@{\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{REQUIRED_SUBSYSTEMS}} = config_mk::binary_get_array(\"$2\", \"$1\",\"REQUIRED_SUBSYSTEMS\");
#
\$SMB_BUILD_CTX->{INPUT}{BINARIES}{$1}{ENABLE} = \"$[SMB_BINARY_ENABLE_][$1]\";
# End Binary $1
diff --git a/source4/build/smb_build/smb_build_h.pm b/source4/build/smb_build/smb_build_h.pm
index bc12b9a268..8dd0635b10 100644
--- a/source4/build/smb_build/smb_build_h.pm
+++ b/source4/build/smb_build/smb_build_h.pm
@@ -6,6 +6,9 @@
### Released under the GNU GPL ###
###########################################################
+package smb_build_h;
+use strict;
+
sub _add_define_section($)
{
my $DEFINE = shift;