From da8acdb57c3cc7d7da025e5b8b0b5ad72b6f0767 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 25 Feb 2008 17:20:33 +0100 Subject: Allow absolute paths to be specified to mkproto.pl. (This used to be commit 6d9fa75a9273d2622642bfe93b2fa470aa95949a) --- source4/script/mkproto.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source4') diff --git a/source4/script/mkproto.pl b/source4/script/mkproto.pl index 3ed845e2bb..d1f8f886f6 100755 --- a/source4/script/mkproto.pl +++ b/source4/script/mkproto.pl @@ -157,7 +157,9 @@ sub process_file($$$) $filename =~ s/\.o$/\.c/g; - if (!open(FH, "< $builddir/$filename")) { + if ($filename =~ /^\//) { + open(FH, "<$filename") or die("Failed to open $filename"); + } elsif (!open(FH, "< $builddir/$filename")) { open(FH, "< $srcdir/$filename") || die "Failed to open $filename"; } -- cgit