From 848e236516ccc15864f7c3d2e05a905f6a81678e Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 10 Jan 2007 08:50:03 +0000 Subject: r20645: Commit the build system changes to allow scripts in config.mk files. Andrew Bartlett (This used to be commit 14b485ba9c72a654e5cf9e61f71fd0fb502d603b) --- source4/build/smb_build/config_mk.pm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'source4/build') diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm index f89e817f5f..42c96f1792 100644 --- a/source4/build/smb_build/config_mk.pm +++ b/source4/build/smb_build/config_mk.pm @@ -117,7 +117,7 @@ use vars qw(@parsed_files); ########################################################### # The parsing function which parses the file # -# $result = _parse_config_mk($filename) +# $result = _parse_config_mk($input, $srcdir, $builddir, $filename) # # $filename - the path of the config.mk file # which should be parsed @@ -133,6 +133,7 @@ sub run_config_mk($$$$) my $parsing_file = $filename; my $retry_parsing_file = undef; + my $basedir; $ENV{samba_builddir} = $builddir; $ENV{samba_srcdir} = $srcdir; @@ -157,8 +158,12 @@ sub run_config_mk($$$$) } } - push (@parsed_files, $parsing_file); - + if ($parsing_file =~ /\|$/) { + $basedir = $builddir; + } else { + $basedir = dirname($filename); + push (@parsed_files, $parsing_file); + } my @lines = ; close(CONFIG_MK); @@ -236,7 +241,7 @@ sub run_config_mk($$$$) $input->{$name}{NAME} = $name; $input->{$name}{TYPE} = $type; $input->{$name}{MK_FILE} = $parsing_file; - $input->{$name}{BASEDIR} = dirname($filename); + $input->{$name}{BASEDIR} = $basedir; foreach my $key (values %{$result->{$section}}) { $key->{VAL} = smb_build::input::strtrim($key->{VAL}); -- cgit