source: vendor/python/2.5/Doc/tools/mkinfo

Last change on this file was 3225, checked in by bird, 18 years ago

Python 2.5

File size: 1.5 KB
Line 
1#! /bin/sh
2# -*- Ksh -*-
3
4# Script to drive the HTML-info conversion process.
5# Pass in upto three parameters:
6# - the name of the main tex file
7# - the name of the output file in texi format (optional)
8# - the name of the output file in info format (optional)
9#
10# Written by Fred L. Drake, Jr. <fdrake@acm.org>
11
12EMACS=${EMACS:-emacs}
13MAKEINFO=${MAKEINFO:-makeinfo}
14
15
16# Normalize file name since something called by html2texi.pl seems to
17# screw up with relative path names.
18FILENAME="$1"
19DOCDIR=`dirname "$FILENAME"`
20DOCFILE=`basename "$FILENAME"`
21DOCNAME=`basename "$FILENAME" .tex`
22if [ $# -gt 1 ]; then
23 TEXINAME="$2"
24else
25 TEXINAME="python-$DOCNAME.texi"
26fi
27if [ $# -gt 2 ]; then
28 INFONAME="$3"
29else
30 INFONAME="python-$DOCNAME.info"
31fi
32
33# Now build the real directory names, and locate our support stuff:
34WORKDIR=`pwd`
35cd `dirname $0`
36TOOLSDIR=`pwd`
37cd $DOCDIR
38DOCDIR=`pwd`
39cd $WORKDIR
40
41COMMONDIR="`dirname $DOCDIR`/commontex"
42
43
44run() {
45 # show what we're doing, like make does:
46 echo "$*"
47 "$@" || exit $?
48}
49
50
51# generate the Texinfo file:
52
53run $EMACS -batch -q --no-site-file -l $TOOLSDIR/py2texi.el \
54 --eval "(setq py2texi-dirs '(\"$DOCDIR\" \"$COMMONDIR\" \"../texinputs\"))" \
55 --eval "(setq py2texi-texi-file-name \"$TEXINAME\")" \
56 --eval "(setq py2texi-info-file-name \"$INFONAME\")" \
57 --eval "(py2texi \"$DOCDIR/$DOCFILE\")" \
58 -f kill-emacs
59echo Done
60
61
62# generate the .info files:
63
64run $MAKEINFO --footnote-style end --fill-column 72 \
65 --paragraph-indent 0 --output=$INFONAME $TEXINAME
Note: See TracBrowser for help on using the repository browser.