summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-05-31 13:25:34 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-05-31 13:25:34 +0000
commitc849746bad648cb0552ce748449db8f6aac7638b (patch)
tree3e669382eead940ef378f9ece69266f15c5e510a /doc
parentf65b3668c14f0121bca1c200a485978b9a4f17cb (diff)
downloadrtems-c849746bad648cb0552ce748449db8f6aac7638b.tar.bz2
Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
Adds a -I <path> option to texi2www. This option is supposed to compatible to the option of the same name in makeinfo, texi2dvi etc. [This patch actually is kind of a hack, but it works :]
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/tools/texi2www/texi2www20
1 files changed, 17 insertions, 3 deletions
diff --git a/doc/tools/texi2www/texi2www b/doc/tools/texi2www/texi2www
index 48b5684c47..e4e291bf0f 100755
--- a/doc/tools/texi2www/texi2www
+++ b/doc/tools/texi2www/texi2www
@@ -26,6 +26,8 @@ where options are:
-footer path -- Specifies the path to a file containing HTML;
this files gets inserted near the bottom of each
generated HTML file.
+ -I path -- Append path to the directories being searched for
+ texi files.
-icons path -- Specifies the path, relative to the output directory,
to the arrow files. Default is `..'.
-base -- Specify the base part fo the genrated short file names
@@ -45,6 +47,8 @@ $outcount = 0; # count for the nnnnn part of short names
$icons = ".."; # where are the icons
$dir = "."; # where are the generated files to go
$dirfile = "../dir.html"; # "up" node pointer
+@include_path = () ; # list of include directories
+
while ($ARGV[0] =~ /^-/) {
$_ = shift;
if (/-base/) {$base = shift; next;}
@@ -55,9 +59,11 @@ while ($ARGV[0] =~ /^-/) {
if (/-icons/) {$_ = shift; s!\/$!!; $icons = $_; next;}
if (/-uselongnames/) {$uselongnames = 1; next;}
if (/-verbose/) {$verbose = 1; next;}
+ if (/-I/) { push @include_path, shift; next;}
die $usage;
}
+print STDERR "include-path:@include_path\n" if $verbose ;
&initialize_tables();
#
@@ -1239,9 +1245,17 @@ sub initialize_tables
########################################################################
sub open_input_file
{
- unshift(@texinfo_file,$_[0]);
- print "opening $_[0] ...\n" if $debug{open_input_file};
- open($texinfo_file[0],$_[0]) || die "Couldn't open $_[0]: $!\n";
+ my $file = "$_[0]" ;
+ if ( not -f "$file" )
+ {
+ foreach $i ( @include_path )
+ {
+ if ( -f "$i/$_[0]" ) { $file = "$i/$_[0]"; last ; }
+ }
+ }
+ unshift(@texinfo_file,$file);
+ print "opening $file ...\n" if $debug{open_input_file};
+ open($texinfo_file[0],$file) || die "Couldn't open $file: $!\n";
} # open_input_file
########################################################################