summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-25 17:20:33 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-25 17:20:33 +0100
commitda8acdb57c3cc7d7da025e5b8b0b5ad72b6f0767 (patch)
tree920d228418fb84049a9c807cee5a473610662d1c
parent1025deb436c9ad4edce5f6e2bf49efa280b4ec28 (diff)
downloadsamba-da8acdb57c3cc7d7da025e5b8b0b5ad72b6f0767.tar.gz
samba-da8acdb57c3cc7d7da025e5b8b0b5ad72b6f0767.tar.bz2
samba-da8acdb57c3cc7d7da025e5b8b0b5ad72b6f0767.zip
Allow absolute paths to be specified to mkproto.pl.
(This used to be commit 6d9fa75a9273d2622642bfe93b2fa470aa95949a)
-rwxr-xr-xsource4/script/mkproto.pl4
1 files changed, 3 insertions, 1 deletions
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";
}