summaryrefslogtreecommitdiff
path: root/source4/build/smb_build/config_mk.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-07-28 11:51:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:30:09 -0500
commit930e624d816a175d5ca4448e6ed40bc7dd8ec5b7 (patch)
treecefd60a954d828902c8fde6a6e8a69954e0baa63 /source4/build/smb_build/config_mk.pm
parentd0496a4ee626f829f1b5032122d2daf53e0bd2e2 (diff)
downloadsamba-930e624d816a175d5ca4448e6ed40bc7dd8ec5b7.tar.gz
samba-930e624d816a175d5ca4448e6ed40bc7dd8ec5b7.tar.bz2
samba-930e624d816a175d5ca4448e6ed40bc7dd8ec5b7.zip
r8826: Make configure generate config.mk files (with the external libraries
that were found) and a config.pm file (with all substitution variables) (This used to be commit 52bb1374bbcfc9b9a6d098687bafe9021a1ee858)
Diffstat (limited to 'source4/build/smb_build/config_mk.pm')
-rw-r--r--source4/build/smb_build/config_mk.pm24
1 files changed, 22 insertions, 2 deletions
diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm
index ba8badc3d1..d26d85f5b9 100644
--- a/source4/build/smb_build/config_mk.pm
+++ b/source4/build/smb_build/config_mk.pm
@@ -19,6 +19,10 @@ my %attribute_types = (
"ADD_OBJ_FILES" => "list",
"OBJ_FILES" => "list",
"SUBSYSTEM" => "string",
+ "CFLAGS" => "list",
+ "CPPFLAGS" => "list",
+ "LDFLAGS" => "list",
+ "LIBS" => "list",
"INIT_FUNCTION" => "string",
"MAJOR_VERSION" => "string",
"MINOR_VERSION" => "string",
@@ -168,7 +172,7 @@ sub import_file($$)
$input->{$name}{TYPE} = $type;
foreach my $key (values %{$result->{$section}}) {
- $key->{VAL} = input::strtrim($key->{VAL});
+ $key->{VAL} = smb_build::input::strtrim($key->{VAL});
my $vartype = $attribute_types{$key->{KEY}};
if (not defined($vartype)) {
die("Unknown attribute $key->{KEY}");
@@ -176,7 +180,7 @@ sub import_file($$)
if ($vartype eq "string") {
$input->{$name}{$key->{KEY}} = $key->{VAL};
} elsif ($vartype eq "list") {
- $input->{$name}{$key->{KEY}} = [input::str2array($key->{VAL})];
+ $input->{$name}{$key->{KEY}} = [smb_build::input::str2array($key->{VAL})];
} elsif ($vartype eq "bool") {
if (($key->{VAL} ne "YES") and ($key->{VAL} ne "NO")) {
die("Invalid value for bool attribute $key->{KEY}: $key->{VAL}");
@@ -186,4 +190,20 @@ sub import_file($$)
}
}
}
+
+sub import_files($$)
+{
+ my ($input, $config_list) = @_;
+
+ open(IN, $config_list) or die("Can't open $config_list: $!");
+ my @mkfiles = grep{!/^#/} <IN>;
+ close(IN);
+
+ $| = 1;
+
+ foreach (@mkfiles) {
+ s/\n//g;
+ import_file($input, $_);
+ }
+}
1;