diff options
author | drow <drow@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-05-02 13:50:58 +0000 |
---|---|---|
committer | drow <drow@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-05-02 13:50:58 +0000 |
commit | 76581c496b3dcedc6e134eba0467849097673bc0 (patch) | |
tree | f23351771cf715ee6f0233edcf65b398a3a1d775 /contrib | |
parent | 0523b3f8725b6d5e25481cf65e31e2206a616177 (diff) | |
download | gcc-76581c496b3dcedc6e134eba0467849097673bc0.tar.gz |
* texi2pod.pl: Handle -I.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113462 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/ChangeLog | 4 | ||||
-rwxr-xr-x | contrib/texi2pod.pl | 18 |
2 files changed, 18 insertions, 4 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 829bdea71a5..57e9dd54782 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,7 @@ +2006-04-17 Daniel Jacobowitz <dan@codesourcery.com> + + * texi2pod.pl: Handle -I. + 2006-02-28 Mark Mitchell <mark@codesourcery.com> * gennews (files): Update for GCC 4.1. diff --git a/contrib/texi2pod.pl b/contrib/texi2pod.pl index 9696a12f361..57d1d5bcd63 100755 --- a/contrib/texi2pod.pl +++ b/contrib/texi2pod.pl @@ -36,6 +36,7 @@ $shift = ""; $fnno = 1; $inf = ""; $ibase = ""; +@ipath = (); while ($_ = shift) { if (/^-D(.*)$/) { @@ -51,6 +52,13 @@ while ($_ = shift) { die "flags may only contain letters, digits, hyphens, dashes and underscores\n" unless $flag =~ /^[a-zA-Z0-9_-]+$/; $defs{$flag} = $value; + } elsif (/^-I(.*)$/) { + if ($1 ne "") { + $flag = $1; + } else { + $flag = shift; + } + push (@ipath, $flag); } elsif (/^-/) { usage(); } else { @@ -229,10 +237,12 @@ while(<$inf>) { $inf = gensym(); $file = postprocess($1); - # Try cwd and $ibase. - open($inf, "<" . $file) - or open($inf, "<" . $ibase . "/" . $file) - or die "cannot open $file or $ibase/$file: $!\n"; + # Try cwd and $ibase, then explicit -I paths. + $done = 0; + foreach $path (".", $ibase, @ipath) { + open($inf, "<" . $path . "/" . $file) and ($done = 1, last); + } + die "cannot find $file" if !$done; next; }; |