Clarify portability and main program.
[python/dscho.git] / Doc / tools / mkhtml.sh
blobab0c2fccd6c18d7c152bf7fbe9d47bafcd6e69e8
1 #! /bin/sh
3 # Drive HTML generation for a Python manual.
5 # This is probably *not* useful outside of the standard Python documentation.
7 # The first arg is required and is the designation for which manual to build;
8 # api, ext, lib, ref, or tut. All other args are passed on to latex2html.
10 WORKDIR=`pwd`
11 cd `dirname $0`/..
12 srcdir=`pwd`
13 cd $WORKDIR
15 part=$1; shift 1
17 TEXINPUTS=$srcdir/$part:$TEXINPUTS
18 export TEXINPUTS
20 if [ -d $part ] ; then
21 rm -f $part/*.html
24 echo "latex2html -init_file $srcdir/perl/l2hinit.perl -dir $part" \
25 "${1:+$@} $srcdir/$part/$part.tex"
26 latex2html \
27 -init_file $srcdir/perl/l2hinit.perl \
28 -dir $part \
29 ${1:+$@} \
30 $srcdir/$part/$part.tex
32 echo '(cd '$part'; '$srcdir'/tools/node2label.pl *.html)'
33 cd $part
34 $srcdir/tools/node2label.pl *.html