1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
samba-mirror/source4/librpc/idl-deps.pl
Andrew Bartlett b57c8ff440 Use an absolute path to ensure that we can always regenerate tables.c
I had trouble building Samba3 in a merged build, perhaps because I was
also building Samba4 in that tree.

Andrew Bartlett
2009-04-16 12:06:35 +10:00

40 lines
945 B
Perl

#!/usr/bin/perl
use strict;
use File::Basename;
use Cwd 'abs_path';
sub add($$)
{
my ($name, $val) = @_;
print "$name += $val\n";
}
my %vars = ();
foreach(@ARGV) {
my $f = $_;
my $b = basename($f);
$b =~ s/\.idl//;
my $gen_ndr = dirname($f);
$gen_ndr =~ s/\/idl$/\/gen_ndr/;
$gen_ndr = abs_path($gen_ndr);
print "# $f\n";
add("IDL_FILES", $f);
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";
}