summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-01-10 08:50:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:37:23 -0500
commit848e236516ccc15864f7c3d2e05a905f6a81678e (patch)
tree0d7fbbbcf7bd4dae9fadd73fbb554ccc080b5c43 /source4
parent2309c52444619c9296f49d6d2a4ba142893eb835 (diff)
downloadsamba-848e236516ccc15864f7c3d2e05a905f6a81678e.tar.gz
samba-848e236516ccc15864f7c3d2e05a905f6a81678e.tar.bz2
samba-848e236516ccc15864f7c3d2e05a905f6a81678e.zip
r20645: Commit the build system changes to allow scripts in config.mk files.
Andrew Bartlett (This used to be commit 14b485ba9c72a654e5cf9e61f71fd0fb502d603b)
Diffstat (limited to 'source4')
-rw-r--r--source4/build/smb_build/config_mk.pm13
1 files changed, 9 insertions, 4 deletions
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 = <CONFIG_MK>;
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});