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-29 15:39:32 +0100
commit21b54de82fc1bbbd80c80908d351fde2409a3feb (patch)
tree80761e1accb587a26f1d9dbb744c4a0c49720da8
parent9817a667331bfa31b06d9895aa96451b1ff0a9d9 (diff)
downloadsamba-21b54de82fc1bbbd80c80908d351fde2409a3feb.tar.gz
samba-21b54de82fc1bbbd80c80908d351fde2409a3feb.tar.bz2
samba-21b54de82fc1bbbd80c80908d351fde2409a3feb.zip
Allow absolute paths to be specified to mkproto.pl.
(This used to be commit 46d8d02028869c97226648113d6bff1c06477d61)
-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 5aeece7155..87a68e33fa 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";
}