From ffc5cbfe803326a1c3bf55684717af910d091c5a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 14 Apr 2008 16:53:00 +0200 Subject: Move object files lists to makefile rather than smb_build. (This used to be commit 5628d58990144463fd87f8c847c9384ac2193681) --- source4/build/smb_build/config_mk.pm | 12 +++++------- source4/build/smb_build/input.pm | 9 +++++---- 2 files changed, 10 insertions(+), 11 deletions(-) (limited to 'source4/build/smb_build') diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm index d8ec646910..de786ddbe5 100644 --- a/source4/build/smb_build/config_mk.pm +++ b/source4/build/smb_build/config_mk.pm @@ -23,14 +23,11 @@ my $section_types = { SWIG_FILE => "string", "PRIVATE_DEPENDENCIES" => "list", "PUBLIC_DEPENDENCIES" => "list", - "OBJ_FILES" => "list", "ENABLE" => "bool", "LDFLAGS" => "list", "CFLAGS" => "list", }, "SUBSYSTEM" => { - "OBJ_FILES" => "list", - "PRIVATE_DEPENDENCIES" => "list", "PUBLIC_DEPENDENCIES" => "list", @@ -47,7 +44,6 @@ my $section_types = { "SUBSYSTEM" => "string", "INIT_FUNCTION" => "string", - "OBJ_FILES" => "list", "PRIVATE_DEPENDENCIES" => "list", @@ -62,7 +58,6 @@ my $section_types = { "CFLAGS" => "list" }, "BINARY" => { - "OBJ_FILES" => "list", "PRIVATE_DEPENDENCIES" => "list", @@ -88,8 +83,6 @@ my $section_types = { "INIT_FUNCTION_SENTINEL" => "string", "OUTPUT_TYPE" => "list", - "OBJ_FILES" => "list", - "PRIVATE_DEPENDENCIES" => "list", "PUBLIC_DEPENDENCIES" => "list", @@ -223,6 +216,9 @@ sub run_config_mk($$$$) { $section = $1; $infragment = 0; + + $result->{$section}{EXISTS}{KEY} = "EXISTS"; + $result->{$section}{EXISTS}{VAL} = 1; next; } @@ -233,6 +229,7 @@ sub run_config_mk($$$$) $subdir =~ s/^\.$//g; $subdir =~ s/^\.\///g; $subdir .= "/" if ($subdir ne ""); + $makefile .= "basedir := $subdir\n"; $makefile .= run_config_mk($input, $srcdir, $builddir, $subdir.$subfile); next; } @@ -280,6 +277,7 @@ sub run_config_mk($$$$) $input->{$name}{BASEDIR} = $basedir; foreach my $key (values %{$result->{$section}}) { + next if ($key->{KEY} eq "EXISTS"); $key->{VAL} = smb_build::input::strtrim($key->{VAL}); my $vartype = $sectype->{$key->{KEY}}; if (not defined($vartype)) { diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm index 948f2657b4..9949836675 100644 --- a/source4/build/smb_build/input.pm +++ b/source4/build/smb_build/input.pm @@ -91,6 +91,9 @@ sub check_module($$$) } if (not defined($mod->{OUTPUT_TYPE})) { + if (not defined($INPUT->{$mod->{SUBSYSTEM}}->{TYPE})) { + die("Invalid type for subsystem $mod->{SUBSYSTEM}"); + } if ($INPUT->{$mod->{SUBSYSTEM}}->{TYPE} eq "EXT_LIB") { $mod->{OUTPUT_TYPE} = undef; } else { @@ -107,7 +110,7 @@ sub check_module($$$) } if (grep(/MERGED_OBJ/, @{$mod->{OUTPUT_TYPE}})) { push (@{$INPUT->{$mod->{SUBSYSTEM}}{INIT_FUNCTIONS}}, $mod->{INIT_FUNCTION}) if defined($mod->{INIT_FUNCTION}); - unshift (@{$INPUT->{$mod->{SUBSYSTEM}}{PRIVATE_DEPENDENCIES}}, $mod->{NAME}); + push (@{$INPUT->{$mod->{SUBSYSTEM}}{PRIVATE_DEPENDENCIES}}, $mod->{NAME}); } } @@ -151,7 +154,6 @@ sub check_python($$$) $dirname .= "/" unless $dirname =~ /\/$/; $dirname = "" if $dirname eq "./"; - $python->{OBJ_FILES} = ["$dirname$basename\_wrap.o"]; $python->{LIBRARY_REALNAME} = "_$basename.\$(SHLIBEXT)"; $python->{PYTHON_FILES} = ["$dirname$basename.py"]; push (@{$python->{CFLAGS}}, "\$(CFLAG_NO_UNUSED_MACROS)"); @@ -189,7 +191,6 @@ sub add_implicit($$) $INPUT->{$n} = { TYPE => "MAKE_RULE", NAME => $n, - TARGET => "", OUTPUT_TYPE => undef, LIBS => ["\$(".uc($n)."_LIBS)"], LDFLAGS => ["\$(".uc($n)."_LDFLAGS)"], @@ -249,7 +250,7 @@ sub check($$$$$) foreach my $part (values %$INPUT) { $part->{LINK_FLAGS} = []; - $part->{FULL_OBJ_LIST} = ["\$($part->{NAME}_OBJ_LIST)"]; + $part->{FULL_OBJ_LIST} = ["\$($part->{NAME}_OBJ_FILES)"]; if ($part->{TYPE} eq "SUBSYSTEM") { check_subsystem($INPUT, $part, $subsys_ot); -- cgit