From 8e16d8a76f8a3b8ccc89eb317c8e5daa6cf43b71 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 14 Nov 2004 16:22:01 +0000 Subject: r3733: More build system fixes/features: - Use .mk files directly (no need for a SMB_*_MK() macro when adding a new SUBSYSTEM, MODULE or BINARY). This allows addition of new modules and subsystems without running configure - Add support for generating .dot files with the Samba4 dependency tree (as used by the graphviz and springgraph utilities) (This used to be commit 64826da834e26ee0488674e27a0eae36491ee179) --- source4/build/smb_build/input.pm | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'source4/build/smb_build/input.pm') diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm index c4a4052d8f..b94586d2c2 100644 --- a/source4/build/smb_build/input.pm +++ b/source4/build/smb_build/input.pm @@ -60,17 +60,23 @@ sub check_module($$) { my $CTX = shift; my $mod = shift; + + 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; + $mod->{SUBSYSTEM} = join(' ', @{$mod->{SUBSYSTEM}}); + if (!(defined($CTX->{INPUT}{$mod->{SUBSYSTEM}}))) { $mod->{BUILD} = "NOT"; $mod->{ENABLE} = "NO"; - printf("Module: %s...PARENT SUBSYSTEM DISABLED\n",$mod->{NAME}); + printf("Module: %s...PARENT SUBSYSTEM ($mod->{SUBSYSTEM}) DISABLED\n",$mod->{NAME}); return; } - if ($mod->{CHOSEN_BUILD} eq "DEFAULT") { + if (not defined($mod->{CHOSEN_BUILD}) or $mod->{CHOSEN_BUILD} eq "DEFAULT") { $mod->{CHOSEN_BUILD} = $mod->{DEFAULT_BUILD}; } @@ -114,6 +120,8 @@ sub check_binary($$) return; } + ($bin->{BINARY} = (lc $bin->{NAME})) if not defined($bin->{BINARY}); + $bin->{OUTPUT_TYPE} = "BINARY"; } @@ -143,6 +151,10 @@ sub check($) { my $CTX = shift; + foreach my $part (values %{$CTX->{INPUT}}) { + ($part->{ENABLE} = "YES") if not defined($part->{ENABLE}); + } + foreach my $part (values %{$CTX->{INPUT}}) { check_subsystem($CTX, $part) if ($part->{TYPE} eq "SUBSYSTEM"); check_module($CTX, $part) if ($part->{TYPE} eq "MODULE"); -- cgit