diff options
Diffstat (limited to 'source4/librpc/idl-deps.pl')
-rw-r--r--[-rwxr-xr-x] | source4/librpc/idl-deps.pl | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/source4/librpc/idl-deps.pl b/source4/librpc/idl-deps.pl index 856a0e2ded..4d97139fc5 100755..100644 --- a/source4/librpc/idl-deps.pl +++ b/source4/librpc/idl-deps.pl @@ -1,5 +1,6 @@ #!/usr/bin/perl use strict; +use File::Basename; sub add($$) { @@ -12,20 +13,25 @@ my %vars = (); foreach(@ARGV) { my $f = $_; - my $b = $_; $b =~ s/.*\/(.*?).idl$/$1/; + my $b = basename($f); + + $b =~ s/\.idl//; + + my $gen_ndr = dirname($f); + $gen_ndr =~ s/\/idl$/\/gen_ndr/; 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"); + add("IDL_HEADER_FILES", "$gen_ndr/$b.h"); + add("IDL_NDR_PARSE_H_FILES", "$gen_ndr/ndr_$b.h"); + add("IDL_NDR_PARSE_C_FILES", "$gen_ndr/ndr_$b.c"); + add("IDL_NDR_CLIENT_C_FILES", "$gen_ndr/ndr_$b\_c.c"); + add("IDL_NDR_CLIENT_H_FILES", "$gen_ndr/ndr_$b\_c.h"); + add("IDL_SWIG_FILES", "$gen_ndr/$b.i"); + add("IDL_NDR_SERVER_C_FILES", "$gen_ndr/ndr_$b\_s.c"); + add("IDL_NDR_EJS_C_FILES", "$gen_ndr/ndr_$b\_ejs.c"); + add("IDL_NDR_EJS_H_FILES", "$gen_ndr/ndr_$b\_ejs.h"); + add("IDL_NDR_PY_C_FILES", "$gen_ndr/py_$b.c"); + add("IDL_NDR_PY_H_FILES", "$gen_ndr/py_$b.h"); print "\n"; } |