s4:samldb LDB module - make the "userAccountControl" and "groupType" modify handlers...
[metze/samba/wip.git] / source4 / build / smb_build / config_mk.pm
index 7e0d2f8f56b7ac2aa56619e1cbf8814adce21932..8c7d75221c7162b8ecba3106bde8dd40b39f3f85 100644 (file)
@@ -20,24 +20,18 @@ my $section_types = {
                "LDFLAGS"               => "list",
                },
        "PYTHON" => {
-               SWIG_FILE => "string",
+               "LIBRARY_REALNAME" => "string",
                "PRIVATE_DEPENDENCIES"  => "list",
                "PUBLIC_DEPENDENCIES"   => "list",
-               "OBJ_FILES" => "list",
                "ENABLE"                => "bool",
                "LDFLAGS"               => "list",
-               "CFLAGS"                => "list",
        },
        "SUBSYSTEM" => {
-               "OBJ_FILES"             => "list",
-
                "PRIVATE_DEPENDENCIES"  => "list",
                "PUBLIC_DEPENDENCIES"   => "list",
 
                "ENABLE"                => "bool",
 
-               "PRIVATE_PROTO_HEADER"  => "string",
-
                "CFLAGS"                => "list",
                "LDFLAGS"               => "list",
                "STANDARD_VISIBILITY"   => "string",
@@ -47,7 +41,6 @@ my $section_types = {
                "SUBSYSTEM"             => "string",
 
                "INIT_FUNCTION"         => "string",
-               "OBJ_FILES"             => "list",
 
                "PRIVATE_DEPENDENCIES"  => "list",
 
@@ -57,46 +50,32 @@ my $section_types = {
 
                "OUTPUT_TYPE"           => "list",
 
-               "PRIVATE_PROTO_HEADER"  => "string",
-
                "CFLAGS"                => "list"
                },
        "BINARY" => {
-               "OBJ_FILES"             => "list",
 
                "PRIVATE_DEPENDENCIES"  => "list",
 
                "ENABLE"                => "bool",
 
                "INSTALLDIR"            => "string",
-               "PRIVATE_PROTO_HEADER"  => "string",
-
-               "CFLAGS"                => "list",
                "LDFLAGS"               => "list",
                "STANDARD_VISIBILITY"   => "string",
 
                "USE_HOSTCC"            => "bool"
                },
        "LIBRARY" => {
-               "VERSION"               => "string",
-               "SO_VERSION"            => "string",
                "LIBRARY_REALNAME" => "string",
 
-               "PC_FILE" => "string",
-               
                "INIT_FUNCTION_TYPE"    => "string",
                "INIT_FUNCTION_SENTINEL" => "string",
                "OUTPUT_TYPE"           => "list",
 
-               "OBJ_FILES"             => "list",
-
                "PRIVATE_DEPENDENCIES"  => "list",
                "PUBLIC_DEPENDENCIES"   => "list",
 
                "ENABLE"                => "bool",
 
-               "PRIVATE_PROTO_HEADER"  => "string",
-
                "CFLAGS"                => "list",
                "LDFLAGS"               => "list",
                "STANDARD_VISIBILITY"   => "string"
@@ -107,14 +86,11 @@ use vars qw(@parsed_files);
 
 @parsed_files = ();
 
-sub _read_config_file
+sub _read_config_file($$$)
 {
-       use File::Basename;
        use Cwd;
 
-       my $srcdir = shift;
-       my $builddir = shift;
-       my $filename = shift;
+       my ($srcdir, $builddir, $filename) = @_;
        my @dirlist;
 
        # We need to change our working directory because config.mk files can
@@ -219,10 +195,13 @@ sub run_config_mk($$$$)
                        $prev = "";
                }
 
-               if ($line =~ /^\[([-a-zA-Z0-9_:]+)\][\t ]*$/) 
+               if ($line =~ /^\[([-a-zA-Z0-9_.:]+)\][\t ]*$/) 
                {
                        $section = $1;
                        $infragment = 0;
+
+                       $result->{$section}{EXISTS}{KEY} = "EXISTS";
+                       $result->{$section}{EXISTS}{VAL} = 1;
                        next;
                }
 
@@ -261,7 +240,7 @@ sub run_config_mk($$$$)
                        next;
                }
 
-               die("$parsing_file:$linenum: Bad line while parsing $parsing_file");
+               die("$parsing_file:$linenum: Bad line");
        }
 
        $makefile .= "# }END $parsing_file\n";
@@ -280,6 +259,7 @@ sub run_config_mk($$$$)
                $input->{$name}{BASEDIR} = $basedir;
 
                foreach my $key (values %{$result->{$section}}) {
+                       next if ($key->{KEY} eq "EXISTS");
                        $key->{VAL} = smb_build::input::strtrim($key->{VAL});
                        my $vartype = $sectype->{$key->{KEY}};
                        if (not defined($vartype)) {