summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-02-23 19:04:16 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:37 +1000
commit7f9c439596266cda7120e123a831aa7d7048e157 (patch)
treea51f321e8323e691093347140f71edaa5f2d0564
parent06940d57967039792d945a4999ccd31dfe4b83c4 (diff)
downloadsamba-7f9c439596266cda7120e123a831aa7d7048e157.tar.gz
samba-7f9c439596266cda7120e123a831aa7d7048e157.tar.bz2
samba-7f9c439596266cda7120e123a831aa7d7048e157.zip
build: auto generate ASN1 and ET rules
-rwxr-xr-xbuildtools/mktowscript/mktowscript.pl42
1 files changed, 37 insertions, 5 deletions
diff --git a/buildtools/mktowscript/mktowscript.pl b/buildtools/mktowscript/mktowscript.pl
index 07ade21d0e..1db7297261 100755
--- a/buildtools/mktowscript/mktowscript.pl
+++ b/buildtools/mktowscript/mktowscript.pl
@@ -143,11 +143,6 @@ sub read_config_mk($)
# lines beginning with '#' are ignored
next if (/^\#.*$/);
- if (/^(mkinclude perl_path_wrapper.sh.*)/) {
- printf(STDERR "Ignoring: %s", $1);
- next;
- }
-
if (/^(.*)\\$/) {
$prev .= $1;
next;
@@ -156,6 +151,35 @@ sub read_config_mk($)
$prev = "";
}
+ if ($line =~ /^mkinclude.*asn1_deps.pl\s+([^\s]+)\s+([^\s]+)\s+\\\$\\\(\w+\\\)\/([^\s|]+)\s*([^|]*)\|$/) {
+ my $src = $1;
+ $section = $2;
+ my $dir = $3;
+ my $options = $4;
+ $section = "HEIMDAL_" . uc($section);
+ $result->{$section}->{TYPE} = 'ASN1';
+ $result->{$section}->{SECNUMBER} = $secnumber++;
+ if ($options ne '') {
+ $result->{$section}->{OPTIONS} = $options;
+ }
+ $result->{$section}->{DIRECTORY} = $dir;
+ $result->{$section}->{$section . '_OBJ_FILES'} = $src;
+ next;
+ }
+
+ if ($line =~ /^mkinclude.*et_deps.pl\s+([^\s]+)\s+\\\$\\\(\w+\\\)\/([^\s|]+)\|$/) {
+ my $src = $1;
+ my $dir = $2;
+ $section = basename($src);
+ $section =~ s/\./_/g;
+ $section = "HEIMDAL_" . uc($section);
+ $result->{$section}->{TYPE} = 'ERRTABLE';
+ $result->{$section}->{SECNUMBER} = $secnumber++;
+ $result->{$section}->{DIRECTORY} = "$dir";
+ $result->{$section}->{$section . '_OBJ_FILES'} = $src;
+ next;
+ }
+
if ($line =~ /^\[(\w+)::([\w-]+)\]/)
{
my $type = $1;
@@ -281,6 +305,14 @@ foreach my $s (sort {$result->{$a}->{SECNUMBER} <=> $result->{$b}->{SECNUMBER}}
$trailer .= sprintf(",\n\tcflags='%s'", strlist($sec->{$k}));
next;
}
+ if ($k eq "OPTIONS") {
+ $trailer .= sprintf(",\n\toptions='%s'", strlist($sec->{$k}));
+ next;
+ }
+ if ($k eq "DIRECTORY") {
+ $trailer .= sprintf(",\n\tdirectory='%s'", strlist($sec->{$k}));
+ next;
+ }
if ($k eq "LDFLAGS") {
$trailer .= sprintf(",\n\tldflags='%s'", strlist($sec->{$k}));
next;