1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
samba-mirror/source4/librpc/idl-deps.pl

38 lines
886 B
Perl
Raw Normal View History

#!/usr/bin/perl
use strict;
2008-12-16 20:56:21 +03:00
use File::Basename;
2008-12-16 18:46:13 +03:00
sub add($$)
{
my ($name, $val) = @_;
print "$name += $val\n";
}
my %vars = ();
foreach(@ARGV) {
2008-10-15 04:33:16 +04:00
my $f = $_;
2008-12-16 20:56:21 +03:00
my $b = basename($f);
$b =~ s/\.idl//;
my $gen_ndr = dirname($f);
$gen_ndr =~ s/\/idl$/\/gen_ndr/;
2008-12-16 18:46:13 +03:00
print "# $f\n";
add("IDL_FILES", $f);
2008-12-16 20:56:21 +03:00
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");
2008-12-16 18:46:13 +03:00
print "\n";
}