summaryrefslogtreecommitdiffstats
path: root/Doc/info
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/info
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/info')
-rw-r--r--Doc/info/Makefile97
-rw-r--r--Doc/info/python.dir6
2 files changed, 51 insertions, 52 deletions
diff --git a/Doc/info/Makefile b/Doc/info/Makefile
index a2c44d3..88c0d6e 100644
--- a/Doc/info/Makefile
+++ b/Doc/info/Makefile
@@ -4,70 +4,67 @@ TOPDIR=..
TOOLSDIR=$(TOPDIR)/tools
HTMLDIR=$(TOPDIR)/html
+# The emacs binary used to build the info docs. GNU Emacs 21 is required.
+EMACS=emacs
+
MKINFO=$(TOOLSDIR)/mkinfo
-SCRIPTS=$(TOOLSDIR)/html2texi.pl $(TOOLSDIR)/checkargs.pm $(TOOLSDIR)/mkinfo \
- $(TOOLSDIR)/fixinfo.el
+SCRIPTS=$(TOOLSDIR)/checkargs.pm $(TOOLSDIR)/mkinfo $(TOOLSDIR)/py2texi.el
+
+# set VERSION to code the VERSION number into the info file name
+# allowing installation of more than one set of python info docs
+# into the same directory
+VERSION=
-all: python-api.info python-ext.info python-lib.info \
- python-ref.info python-tut.info \
- python-dist.info python-inst.info
+all: check-emacs-version \
+ python$(VERSION)-api.info python$(VERSION)-ext.info \
+ python$(VERSION)-lib.info python$(VERSION)-ref.info \
+ python$(VERSION)-tut.info python$(VERSION)-dist.info
+# python$(VERSION)-doc.info python$(VERSION)-inst.info
+# python$(VERSION)-mac.info
-python-api.info: $(HTMLDIR)/api/api.html $(SCRIPTS)
- $(MKINFO) $<
+check-emacs-version:
+ @v="`$(EMACS) --version 2>&1 | egrep '^(GNU |X)Emacs [12]*'`"; \
+ if `echo "$$v" | grep '^GNU Emacs 21' >/dev/null 2>&1`; then \
+ echo "Using $(EMACS) to build the info docs"; \
+ else \
+ echo "GNU Emacs 21 is required to build the info docs"; \
+ echo "Found $$v"; \
+ false; \
+ fi
-python-ext.info: $(HTMLDIR)/ext/ext.html $(SCRIPTS)
- $(MKINFO) $<
+python$(VERSION)-api.info: ../api/api.tex $(SCRIPTS)
+ EMACS=$(EMACS) $(MKINFO) $< $@
-python-lib.info: $(HTMLDIR)/lib/lib.html $(SCRIPTS)
- $(MKINFO) $<
+python$(VERSION)-ext.info: ../ext/ext.tex $(SCRIPTS)
+ EMACS=$(EMACS) $(MKINFO) $< $@
+
+python$(VERSION)-lib.info: ../lib/lib.tex $(SCRIPTS)
+ EMACS=$(EMACS) $(MKINFO) $< $@
# Not built by default; the conversion doesn't really handle it well.
-python-mac.info: $(HTMLDIR)/mac/mac.html $(SCRIPTS)
- $(MKINFO) $<
+python$(VERSION)-mac.info: ../mac/mac.tex $(SCRIPTS)
+ EMACS=$(EMACS) $(MKINFO) $< $@
+
+python$(VERSION)-ref.info: ../ref/ref.tex $(SCRIPTS)
+ EMACS=$(EMACS) $(MKINFO) $< $@
-python-ref.info: $(HTMLDIR)/ref/ref.html $(SCRIPTS)
- $(MKINFO) $<
+python$(VERSION)-tut.info: ../tut/tut.tex $(SCRIPTS)
+ EMACS=$(EMACS) $(MKINFO) $< $@
-python-tut.info: $(HTMLDIR)/tut/tut.html $(SCRIPTS)
- $(MKINFO) $<
+# Not built by default; the conversion doesn't handle it at all.
+python$(VERSION)-doc.info: ../doc/doc.tex $(SCRIPTS)
+ EMACS=$(EMACS) $(MKINFO) $< $@
-python-dist.info: $(HTMLDIR)/dist/dist.html $(SCRIPTS)
- $(MKINFO) $<
+python$(VERSION)-dist.info: ../dist/dist.tex $(SCRIPTS)
+ EMACS=$(EMACS) $(MKINFO) $< $@
-python-inst.info: $(HTMLDIR)/inst/inst.html $(SCRIPTS)
- $(MKINFO) $<
+# Not built by default; the conversion chokes on two @end multitable's
+python$(VERSION)-inst.info: ../inst/inst.tex $(SCRIPTS)
+ EMACS=$(EMACS) $(MKINFO) $< $@
clean:
rm -f *.texi~ *.texi
clobber: clean
- rm -f *.texi python-*.info python-*.info-[0-9]*
-
-
-# This makes sure we can build info files from a "clean" tree,
-# in case we haven't already built the HTML:
-
-$(HTMLDIR)/api/api.html:
- cd $(HTMLDIR) && $(MAKE) api
-
-$(HTMLDIR)/ext/ext.html:
- cd $(HTMLDIR) && $(MAKE) ext
-
-$(HTMLDIR)/lib/lib.html:
- cd $(HTMLDIR) && $(MAKE) lib
-
-$(HTMLDIR)/mac/mac.html:
- cd $(HTMLDIR) && $(MAKE) mac
-
-$(HTMLDIR)/ref/ref.html:
- cd $(HTMLDIR) && $(MAKE) ref
-
-$(HTMLDIR)/tut/tut.html:
- cd $(HTMLDIR) && $(MAKE) tut
-
-$(HTMLDIR)/dist/dist.html:
- cd $(HTMLDIR) && $(MAKE) dist
-
-$(HTMLDIR)/inst/inst.html:
- cd $(HTMLDIR) && $(MAKE) inst
+ rm -f *.texi python*-*.info python*-*.info-[0-9]*
diff --git a/Doc/info/python.dir b/Doc/info/python.dir
index 9a09d70..dce2bb3 100644
--- a/Doc/info/python.dir
+++ b/Doc/info/python.dir
@@ -2,9 +2,11 @@
Python Standard Documentation
* Python Library: (python-lib). Python Library Reference
+* Python Mac Modules: (python-mac). Python Macintosh Modules
* Python Reference: (python-ref). Python Reference Manual
-* Python Distutils: (python-dist). Distributing Python Modules
* Python API: (python-api). Python/C API Reference Manual
* Python Extending: (python-ext). Extending & Embedding Python
-* Python Mac Modules: (python-mac). Python Macintosh Modules
* Python Tutorial: (python-tut). Python Tutorial
+* Documenting Python: (python-doc). Documenting Python
+* Installing Modules: (python-inst). Installing Python Modules
+* Distributing Modules: (python-dist). Distributing Python Modules