summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-12-16 16:46:13 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-12-16 16:46:13 +0100
commit4c7293feaed7aca289aee68a6677dc0b629deb24 (patch)
treefa1f314323e653dc885be66f128fcec61dda52fe /source4
parent121970d22409dd3686a7082e52682636eb6a133f (diff)
downloadsamba-4c7293feaed7aca289aee68a6677dc0b629deb24.tar.gz
samba-4c7293feaed7aca289aee68a6677dc0b629deb24.tar.bz2
samba-4c7293feaed7aca289aee68a6677dc0b629deb24.zip
Simplify idl-deps.pl script a bit.
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/librpc/idl-deps.pl36
1 files changed, 21 insertions, 15 deletions
diff --git a/source4/librpc/idl-deps.pl b/source4/librpc/idl-deps.pl
index 44990c5196..856a0e2ded 100755
--- a/source4/librpc/idl-deps.pl
+++ b/source4/librpc/idl-deps.pl
@@ -1,25 +1,31 @@
#!/usr/bin/perl
use strict;
+sub add($$)
+{
+ my ($name, $val) = @_;
+
+ print "$name += $val\n";
+}
+
my %vars = ();
foreach(@ARGV) {
my $f = $_;
my $b = $_; $b =~ s/.*\/(.*?).idl$/$1/;
- push (@{$vars{IDL_FILES}}, $f);
- push (@{$vars{IDL_HEADER_FILES}}, "\$(librpcsrcdir)/gen_ndr/$b.h");
- push (@{$vars{IDL_NDR_PARSE_H_FILES}}, "\$(librpcsrcdir)/gen_ndr/ndr_$b.h");
- push (@{$vars{IDL_NDR_PARSE_C_FILES}}, "\$(librpcsrcdir)/gen_ndr/ndr_$b.c");
- push (@{$vars{IDL_NDR_CLIENT_C_FILES}}, "\$(librpcsrcdir)/gen_ndr/ndr_$b\_c.c");
- push (@{$vars{IDL_NDR_CLIENT_H_FILES}}, "\$(librpcsrcdir)/gen_ndr/ndr_$b\_c.h");
- push (@{$vars{IDL_SWIG_FILES}}, "\$(librpcsrcdir)/gen_ndr/$b.i");
- push (@{$vars{IDL_NDR_SERVER_C_FILES}}, "\$(librpcsrcdir)/gen_ndr/ndr_$b\_s.c");
- push (@{$vars{IDL_NDR_EJS_C_FILES}}, "\$(librpcsrcdir)/gen_ndr/ndr_$b\_ejs.c");
- push (@{$vars{IDL_NDR_EJS_H_FILES}}, "\$(librpcsrcdir)/gen_ndr/ndr_$b\_ejs.h");
- push (@{$vars{IDL_NDR_PY_C_FILES}}, "\$(librpcsrcdir)/gen_ndr/py_$b.c");
- push (@{$vars{IDL_NDR_PY_H_FILES}}, "\$(librpcsrcdir)/gen_ndr/py_$b.h");
-}
-foreach (keys %vars) {
- print "$_ = " . join (' ', @{$vars{$_}}) . "\n";
+ print "# $f\n";
+ add("IDL_FILES", $f);
+ add("IDL_HEADER_FILES", "\$(librpcsrcdir)/gen_ndr/$b.h");
+ add("IDL_NDR_PARSE_H_FILES", "\$(librpcsrcdir)/gen_ndr/ndr_$b.h");
+ add("IDL_NDR_PARSE_C_FILES", "\$(librpcsrcdir)/gen_ndr/ndr_$b.c");
+ add("IDL_NDR_CLIENT_C_FILES", "\$(librpcsrcdir)/gen_ndr/ndr_$b\_c.c");
+ add("IDL_NDR_CLIENT_H_FILES", "\$(librpcsrcdir)/gen_ndr/ndr_$b\_c.h");
+ add("IDL_SWIG_FILES", "\$(librpcsrcdir)/gen_ndr/$b.i");
+ add("IDL_NDR_SERVER_C_FILES", "\$(librpcsrcdir)/gen_ndr/ndr_$b\_s.c");
+ add("IDL_NDR_EJS_C_FILES", "\$(librpcsrcdir)/gen_ndr/ndr_$b\_ejs.c");
+ add("IDL_NDR_EJS_H_FILES", "\$(librpcsrcdir)/gen_ndr/ndr_$b\_ejs.h");
+ add("IDL_NDR_PY_C_FILES", "\$(librpcsrcdir)/gen_ndr/py_$b.c");
+ add("IDL_NDR_PY_H_FILES", "\$(librpcsrcdir)/gen_ndr/py_$b.h");
+ print "\n";
}