1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

r15247: Get rid of patsubst macro as it is not supported by some makes and replace

it with a perl script.
This should fix the build on tru64
This commit is contained in:
Jelmer Vernooij 2006-04-25 16:31:12 +00:00 committed by Gerald (Jerry) Carter
parent 96da29263b
commit b4e08b98a6
2 changed files with 23 additions and 10 deletions

21
source/librpc/idl-deps.pl Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/perl
use strict;
my %vars = ();
foreach(@ARGV) {
push (@{$vars{IDL_FILES}}, $_);
my $b = $_; $b =~ s/.*\/(.*?).idl$/\1/;
push (@{$vars{IDL_HEADER_FILES}}, "librpc/gen_ndr/$b.h");
push (@{$vars{IDL_NDR_HEADER_FILES}}, "librpc/gen_ndr/ndr_$b.h");
push (@{$vars{IDL_NDR_PARSE_FILES}}, "librpc/gen_ndr/ndr_$b.c");
push (@{$vars{IDL_NDR_CLIENT_C_FILES}}, "librpc/gen_ndr/ndr_$b\_c.c");
push (@{$vars{IDL_NDR_CLIENT_HEADER_FILES}}, "librpc/gen_ndr/ndr_$b\_c.h");
push (@{$vars{IDL_NDR_SERVER_C_FILES}}, "librpc/gen_ndr/ndr_$b\_s.c");
push (@{$vars{IDL_NDR_EJS_C_FILES}}, "librpc/gen_ndr/ndr_$b\_ejs.c");
push (@{$vars{IDL_NDR_EJS_H_FILES}}, "librpc/gen_ndr/ndr_$b\_ejs.h");
}
foreach (keys %vars) {
print "$_ = " . join (' ', @{$vars{$_}}) . "\n";
}

View File

@ -188,15 +188,7 @@ installpidl: pidl/Makefile
uninstallpidl: pidl/Makefile
$(MAKE) -C pidl uninstall
IDL_FILES = $(wildcard librpc/idl/*.idl)
IDL_HEADER_FILES = $(patsubst librpc/idl/%.idl,librpc/gen_ndr/%.h,$(IDL_FILES))
IDL_NDR_HEADER_FILES = $(patsubst librpc/idl/%.idl,librpc/gen_ndr/ndr_%.h,$(IDL_FILES))
IDL_NDR_PARSE_C_FILES = $(patsubst librpc/idl/%.idl,librpc/gen_ndr/ndr_%.c,$(IDL_FILES))
IDL_NDR_CLIENT_C_FILES = $(patsubst librpc/idl/%.idl,librpc/gen_ndr/ndr_%_c.c,$(IDL_FILES))
IDL_NDR_CLIENT_HEADER_FILES = $(patsubst librpc/idl/%.idl,librpc/gen_ndr/ndr_%_c.h,$(IDL_FILES))
IDL_NDR_SERVER_C_FILES = $(patsubst librpc/idl/%.idl,librpc/gen_ndr/ndr_%_s.c,$(IDL_FILES))
IDL_NDR_EJS_C_FILES = $(patsubst librpc/idl/%.idl,librpc/gen_ndr/ndr_%_ejs.c,$(IDL_FILES))
IDL_NDR_EJS_H_FILES = $(patsubst librpc/idl/%.idl,librpc/gen_ndr/ndr_%_ejs.h,$(IDL_FILES))
include librpc/idl-deps.pl librpc/idl/*.idl|
$(IDL_HEADER_FILES) $(IDL_NDR_HEADER_FILES) $(IDL_NDR_PARSE_C_FILES) \
$(IDL_NDR_CLIENT_C_FILES) $(IDL_NDR_CLIENT_H_FILES) \
@ -319,7 +311,7 @@ unused_macros:
@$(CC) -M -MG -MP -MT $(<:.c=.o) `$(PERL) $(srcdir)/script/cflags.pl $@` $(CFLAGS) $< -o $@
.c.hd:
@echo "Generating dependencies for $<"
@echo "Generating host-compiler dependencies for $<"
@$(CC) -M -MG -MP -MT $(<:.c=.ho) `$(PERL) $(srcdir)/script/cflags.pl $@` $(CFLAGS) $< -o $@
include/includes.d: include/includes.h