summaryrefslogtreecommitdiffstats
path: root/Doc/tools/mkinfo
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2002-05-03 04:50:51 (GMT)
committerFred Drake <fdrake@acm.org>2002-05-03 04:50:51 (GMT)
commitbfc18bdf031bb473e8f3ed5d9a880458893524a3 (patch)
tree5167c35af9f45319c75ce847a86c108a748e4b05 /Doc/tools/mkinfo
parenta3b0b298e6c5f5ced9e99dc067e809fece049e66 (diff)
downloadcpython-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-xDoc/tools/mkinfo19
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