svn commit: samba r10122 - in branches/tmp/samba4-winsrepl: .
source/build/smb_build
metze at samba.org
metze at samba.org
Fri Sep 9 18:09:50 GMT 2005
Author: metze
Date: 2005-09-09 18:09:44 +0000 (Fri, 09 Sep 2005)
New Revision: 10122
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10122
Log:
r10112 at SERNOX: metze | 2005-09-09 13:03:53 +0200
- check attributes depending on the section type
metze
Modified:
branches/tmp/samba4-winsrepl/
branches/tmp/samba4-winsrepl/source/build/smb_build/config_mk.pm
Changeset:
Property changes on: branches/tmp/samba4-winsrepl
___________________________________________________________________
Name: svk:merge
- 0c0555d6-39d7-0310-84fc-f1cc0bd64818:/branches/SAMBA_4_0:10111
3a72dc49-98ff-0310-ab52-9b7ed7945d91:/local/samba4:9495
a953eb74-4aff-0310-a63c-855d20285ebb:/local/samba4:11627
+ 0c0555d6-39d7-0310-84fc-f1cc0bd64818:/branches/SAMBA_4_0:10112
3a72dc49-98ff-0310-ab52-9b7ed7945d91:/local/samba4:9495
a953eb74-4aff-0310-a63c-855d20285ebb:/local/samba4:11627
Modified: branches/tmp/samba4-winsrepl/source/build/smb_build/config_mk.pm
===================================================================
--- branches/tmp/samba4-winsrepl/source/build/smb_build/config_mk.pm 2005-09-09 18:09:29 UTC (rev 10121)
+++ branches/tmp/samba4-winsrepl/source/build/smb_build/config_mk.pm 2005-09-09 18:09:44 UTC (rev 10122)
@@ -11,28 +11,73 @@
use strict;
-my %attribute_types = (
- "NOPROTO" => "bool",
- "REQUIRED_SUBSYSTEMS" => "list",
- "OUTPUT_TYPE" => "string",
- "INIT_OBJ_FILES" => "list",
- "ADD_OBJ_FILES" => "list",
- "OBJ_FILES" => "list",
- "SUBSYSTEM" => "string",
- "CFLAGS" => "list",
- "CPPFLAGS" => "list",
- "LDFLAGS" => "list",
- "INSTALLDIR" => "string",
- "LIBS" => "list",
- "INIT_FUNCTION" => "string",
- "MAJOR_VERSION" => "string",
- "MINOR_VERSION" => "string",
- "RELEASE_VERSION" => "string",
- "ENABLE" => "bool",
- "CMD" => "string",
- "MANPAGE" => "string"
-);
+my $section_types = {
+ "EXT_LIB" => {
+ "LIBS" => "list",
+ "CFLAGS" => "list",
+ "CPPFLAGS" => "list",
+ "LDFLAGS" => "list",
+ },
+ "SUBSYSTEM" => {
+ "INIT_FUNCTION" => "string",
+ "INIT_OBJ_FILES" => "list",
+ "ADD_OBJ_FILES" => "list",
+ "OBJ_FILES" => "list",
+ "REQUIRED_SUBSYSTEMS" => "list",
+ "TARGET_DEPS" => "list",
+
+ "ENABLE" => "bool",
+ "NOPROTO" => "bool",
+
+ "MANPAGE" => "string",
+ },
+ "MODULE" => {
+ "SUBSYSTEM" => "string",
+
+ "INIT_FUNCTION" => "string",
+ "INIT_OBJ_FILES" => "list",
+ "ADD_OBJ_FILES" => "list",
+ "OBJ_FILES" => "list",
+
+ "REQUIRED_SUBSYSTEMS" => "list",
+ "TARGET_DEPS" => "list",
+
+ "ENABLE" => "bool",
+ "NOPROTO" => "bool",
+
+ "MANPAGE" => "string",
+ },
+ "BINARY" => {
+ "OBJ_FILES" => "list",
+
+ "REQUIRED_SUBSYSTEMS" => "list",
+ "TARGET_DEPS" => "list",
+
+ "ENABLE" => "bool",
+ "NOPROTO" => "bool",
+
+ "MANPAGE" => "string",
+ "INSTALLDIR" => "string",
+ },
+ "LIBRARY" => {
+ "MAJOR_VERSION" => "string",
+ "MINOR_VERSION" => "string",
+ "RELEASE_VERSION" => "string",
+
+ "OBJ_FILES" => "list",
+
+ "REQUIRED_SUBSYSTEMS" => "list",
+ "TARGET_DEPS" => "list",
+
+ "ENABLE" => "bool",
+ "NOPROTO" => "bool",
+
+ "MANPAGE" => "string",
+ "INSTALLDIR" => "string",
+ }
+};
+
use vars qw(@parsed_files);
@parsed_files = ();
@@ -118,15 +163,20 @@
foreach my $section (keys %{$result}) {
my ($type, $name) = split(/::/, $section, 2);
-
+
+ my $sectype = $section_types->{$type};
+ if (not defined($sectype)) {
+ die($filename.":[".$section."] unknown section type \"".$type."\"!");
+ }
+
$input->{$name}{NAME} = $name;
$input->{$name}{TYPE} = $type;
foreach my $key (values %{$result->{$section}}) {
$key->{VAL} = smb_build::input::strtrim($key->{VAL});
- my $vartype = $attribute_types{$key->{KEY}};
+ my $vartype = $sectype->{$key->{KEY}};
if (not defined($vartype)) {
- die("$filename:Unknown attribute $key->{KEY} with value $key->{VAL} in section $section");
+ die($filename.":[".$section."]: unknown attribute type \"$key->{KEY}\"!");
}
if ($vartype eq "string") {
$input->{$name}{$key->{KEY}} = $key->{VAL};
More information about the samba-cvs
mailing list