From 2de1e5299dc4e6bc925ee1053d09c16793f6d3bc Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 12 Nov 2004 02:47:24 +0000 Subject: r3695: Add intermediate functions to use when migrating from .m4+.mk to .pm files (This used to be commit fb849a309b823296a31bbf0b5b683760119c615c) --- source4/build/smb_build/direct.pm | 63 +++++++++++++++++++++++++++++++++++++++ source4/build/smb_build/main.pm | 7 +++-- 2 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 source4/build/smb_build/direct.pm (limited to 'source4/build') diff --git a/source4/build/smb_build/direct.pm b/source4/build/smb_build/direct.pm new file mode 100644 index 0000000000..6bedf4f04a --- /dev/null +++ b/source4/build/smb_build/direct.pm @@ -0,0 +1,63 @@ +# Subs for build system stuff without the .mk files +# Copyright (C) 2004 Jelmer Vernooij + +use strict; + +our $SMB_BUILD_CTX; + +sub Subsystem($$) +{ + my $name = shift; + my $data = shift; + $data->{NAME} = $name; + %{$SMB_BUILD_CTX->{INPUT}{SUBSYSTEM}{$name}} = %{$data}; +} + +sub Module($$) +{ + my $name = shift; + my $data = shift; + $data->{NAME} = $name; + %{$SMB_BUILD_CTX->{INPUT}{MODULES}{$name}} = %{$data}; +} + +sub ExternalLibrary($$) +{ + my $name = shift; + my $data = shift; + $data->{NAME} = $name; + %{$SMB_BUILD_CTX->{INPUT}{EXT_LIBS}{$name}} = %{$data}; +} + +sub Library($$) +{ + my $name = shift; + my $data = shift; + $data->{NAME} = $name; + %{$SMB_BUILD_CTX->{INPUT}{LIBRARIES}{$name}} = %{$data}; +} + +sub Binary($$) +{ + my $name = shift; + my $data = shift; + $data->{NAME} = $name; + %{$SMB_BUILD_CTX->{INPUT}{BINARIES}{$name}} = %{$data}; +} + +sub DisableModule($) +{ + $SMB_BUILD_CTX->{INPUT}{MODULES}{shift}{ENABLE} = "NO"; +} + +sub DisableBinary($) +{ + $SMB_BUILD_CTX->{INPUT}{BINARIES}{shift}{ENABLE} = "NO"; +} + +sub DisableLibrary($) +{ + $SMB_BUILD_CTX->{INPUT}{LIBRARIES}{shift}{ENABLE} = "NO"; +} + +1; diff --git a/source4/build/smb_build/main.pm b/source4/build/smb_build/main.pm index b84f4fd8be..98b61539c1 100644 --- a/source4/build/smb_build/main.pm +++ b/source4/build/smb_build/main.pm @@ -12,14 +12,16 @@ use smb_build_h; use input; use config_mk; use output; +use direct; use dump; use strict; sub smb_build_main($) { - my $SMB_BUILD_CTX = shift; - input::check($SMB_BUILD_CTX); + our $SMB_BUILD_CTX = shift; + input::check($SMB_BUILD_CTX); + depend::create_depend($SMB_BUILD_CTX); output::create_output($SMB_BUILD_CTX); @@ -30,6 +32,7 @@ sub smb_build_main($) dump::dump_ctx($SMB_BUILD_CTX); + return 0; } 1; -- cgit