diff options
author | Fred Drake <fdrake@acm.org> | 2002-05-03 04:50:51 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2002-05-03 04:50:51 (GMT) |
commit | bfc18bdf031bb473e8f3ed5d9a880458893524a3 (patch) | |
tree | 5167c35af9f45319c75ce847a86c108a748e4b05 /Doc/tools/mkinfo | |
parent | a3b0b298e6c5f5ced9e99dc067e809fece049e66 (diff) | |
download | cpython-bfc18bdf031bb473e8f3ed5d9a880458893524a3.zip cpython-bfc18bdf031bb473e8f3ed5d9a880458893524a3.tar.gz cpython-bfc18bdf031bb473e8f3ed5d9a880458893524a3.tar.bz2 |
Integrated SF patch #539487 by Matthias Klose:
This patch adds Milan Zamazal's conversion script and
modifies the mkinfo script to build the info doc files
from the LaTeX sources. Currently, the mac, doc and
inst TeX files are not handled.
Explicitly checks for GNU Emacs 21.
Diffstat (limited to 'Doc/tools/mkinfo')
-rwxr-xr-x | Doc/tools/mkinfo | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/Doc/tools/mkinfo b/Doc/tools/mkinfo index edba1db..64fb86e 100755 --- a/Doc/tools/mkinfo +++ b/Doc/tools/mkinfo @@ -17,7 +17,12 @@ MAKEINFO=${MAKEINFO:-makeinfo} FILENAME="$1" DOCDIR=`dirname "$FILENAME"` DOCFILE=`basename "$FILENAME"` -DOCNAME=`basename "$FILENAME" .html` +DOCNAME=`basename "$FILENAME" .tex` +if [ $# -gt 1 ]; then + INFONAME="$2" +else + INFONAME="python-$DOCNAME.info" +fi # Now build the real directory names, and locate our support stuff: WORKDIR=`pwd` @@ -31,18 +36,20 @@ cd $WORKDIR run() { # show what we're doing, like make does: echo "$*" - $* || exit $? + "$@" || exit $? } # generate the Texinfo file: -run $PERL -I$TOOLSDIR $TOOLSDIR/html2texi.pl $DOCDIR/$DOCFILE -run $EMACS -batch -l $TOOLSDIR/fixinfo.el $DOCNAME.texi -rm -f $DOCNAME.texi~ +run $EMACS -batch -q --no-site-file -l $TOOLSDIR/py2texi.el \ + --eval "(setq py2texi-dirs '(\"./\" \"../texinputs/\" \"$DOCDIR\"))" \ + --eval "(py2texi \"$DOCDIR/$DOCFILE\")" \ + -f kill-emacs +echo Done # generate the .info files: run $MAKEINFO --footnote-style end --fill-column 72 \ - --paragraph-indent 0 $DOCNAME.texi + --paragraph-indent 0 --output=$INFONAME $DOCNAME.texi |