diff options
Diffstat (limited to 'source4/build/smb_build')
-rw-r--r-- | source4/build/smb_build/direct.pm | 63 | ||||
-rw-r--r-- | source4/build/smb_build/main.pm | 7 |
2 files changed, 68 insertions, 2 deletions
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 <jelmer@samba.org> + +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; |