@@ -4,70 +4,67 @@ TOPDIR=..
44TOOLSDIR =$(TOPDIR ) /tools
55HTMLDIR =$(TOPDIR ) /html
66
7+ # The emacs binary used to build the info docs. GNU Emacs 21 is required.
8+ EMACS =emacs
9+
710MKINFO =$(TOOLSDIR ) /mkinfo
8- SCRIPTS =$(TOOLSDIR ) /html2texi.pl $(TOOLSDIR ) /checkargs.pm $(TOOLSDIR ) /mkinfo \
9- $(TOOLSDIR ) /fixinfo.el
11+ SCRIPTS =$(TOOLSDIR ) /checkargs.pm $(TOOLSDIR ) /mkinfo $(TOOLSDIR ) /py2texi.el
12+
13+ # set VERSION to code the VERSION number into the info file name
14+ # allowing installation of more than one set of python info docs
15+ # into the same directory
16+ VERSION =
1017
11- all : python-api.info python-ext.info python-lib.info \
12- python-ref.info python-tut.info \
13- python-dist.info python-inst.info
18+ all : check-emacs-version \
19+ python$(VERSION ) -api.info python$(VERSION ) -ext.info \
20+ python$(VERSION ) -lib.info python$(VERSION ) -ref.info \
21+ python$(VERSION ) -tut.info python$(VERSION ) -dist.info
1422
23+ # python$(VERSION)-doc.info python$(VERSION)-inst.info
24+ # python$(VERSION)-mac.info
1525
16- python-api.info : $(HTMLDIR ) /api/api.html $(SCRIPTS )
17- $(MKINFO ) $<
26+ check-emacs-version :
27+ @v=" ` $( EMACS) --version 2>&1 | egrep ' ^(GNU |X)Emacs [12]*' ` " ; \
28+ if ` echo " $$ v" | grep ' ^GNU Emacs 21' > /dev/null 2>&1 ` ; then \
29+ echo " Using $( EMACS) to build the info docs" ; \
30+ else \
31+ echo " GNU Emacs 21 is required to build the info docs" ; \
32+ echo " Found $$ v" ; \
33+ false ; \
34+ fi
1835
19- python-ext .info : $( HTMLDIR ) /ext/ext.html $(SCRIPTS )
20- $( MKINFO ) $<
36+ python$( VERSION ) -api .info : ../api/api.tex $(SCRIPTS )
37+ EMACS= $( EMACS ) $( MKINFO ) $< $@
2138
22- python-lib.info : $(HTMLDIR ) /lib/lib.html $(SCRIPTS )
23- $(MKINFO ) $<
39+ python$(VERSION ) -ext.info : ../ext/ext.tex $(SCRIPTS )
40+ EMACS=$(EMACS ) $(MKINFO ) $< $@
41+
42+ python$(VERSION ) -lib.info : ../lib/lib.tex $(SCRIPTS )
43+ EMACS=$(EMACS ) $(MKINFO ) $< $@
2444
2545# Not built by default; the conversion doesn't really handle it well.
26- python-mac.info : $(HTMLDIR ) /mac/mac.html $(SCRIPTS )
27- $(MKINFO ) $<
46+ python$(VERSION ) -mac.info : ../mac/mac.tex $(SCRIPTS )
47+ EMACS=$(EMACS ) $(MKINFO ) $< $@
48+
49+ python$(VERSION ) -ref.info : ../ref/ref.tex $(SCRIPTS )
50+ EMACS=$(EMACS ) $(MKINFO ) $< $@
2851
29- python-ref .info : $( HTMLDIR ) /ref/ref.html $(SCRIPTS )
30- $( MKINFO ) $<
52+ python$( VERSION ) -tut .info : ../tut/tut.tex $(SCRIPTS )
53+ EMACS= $( EMACS ) $( MKINFO ) $< $@
3154
32- python-tut.info : $(HTMLDIR ) /tut/tut.html $(SCRIPTS )
33- $(MKINFO ) $<
55+ # Not built by default; the conversion doesn't handle it at all.
56+ python$(VERSION ) -doc.info : ../doc/doc.tex $(SCRIPTS )
57+ EMACS=$(EMACS ) $(MKINFO ) $< $@
3458
35- python-dist.info : $( HTMLDIR ) /dist/dist.html $(SCRIPTS )
36- $( MKINFO ) $<
59+ python$( VERSION ) -dist.info : .. /dist/dist.tex $(SCRIPTS )
60+ EMACS= $( EMACS ) $( MKINFO ) $< $@
3761
38- python-inst.info : $(HTMLDIR ) /inst/inst.html $(SCRIPTS )
39- $(MKINFO ) $<
62+ # Not built by default; the conversion chokes on two @end multitable's
63+ python$(VERSION ) -inst.info : ../inst/inst.tex $(SCRIPTS )
64+ EMACS=$(EMACS ) $(MKINFO ) $< $@
4065
4166clean :
4267 rm -f * .texi~ * .texi
4368
4469clobber : clean
45- rm -f * .texi python-* .info python-* .info-[0-9]*
46-
47-
48- # This makes sure we can build info files from a "clean" tree,
49- # in case we haven't already built the HTML:
50-
51- $(HTMLDIR ) /api/api.html :
52- cd $(HTMLDIR ) && $(MAKE ) api
53-
54- $(HTMLDIR ) /ext/ext.html :
55- cd $(HTMLDIR ) && $(MAKE ) ext
56-
57- $(HTMLDIR ) /lib/lib.html :
58- cd $(HTMLDIR ) && $(MAKE ) lib
59-
60- $(HTMLDIR ) /mac/mac.html :
61- cd $(HTMLDIR ) && $(MAKE ) mac
62-
63- $(HTMLDIR ) /ref/ref.html :
64- cd $(HTMLDIR ) && $(MAKE ) ref
65-
66- $(HTMLDIR ) /tut/tut.html :
67- cd $(HTMLDIR ) && $(MAKE ) tut
68-
69- $(HTMLDIR ) /dist/dist.html :
70- cd $(HTMLDIR ) && $(MAKE ) dist
71-
72- $(HTMLDIR ) /inst/inst.html :
73- cd $(HTMLDIR ) && $(MAKE ) inst
70+ rm -f * .texi python* -* .info python* -* .info-[0-9]*
0 commit comments