blob: 008e3692b566f7a609c5c52befabe063efd0f368 [file] [log] [blame]
Fred Drake47fd8fe1998-05-08 15:36:36 +00001# Generate the Python "info" documentation.
2
Fred Drake78104a91999-01-08 15:33:38 +00003TOPDIR=..
4TOOLSDIR=$(TOPDIR)/tools
Fred Drake78104a91999-01-08 15:33:38 +00005HTMLDIR=$(TOPDIR)/html
6
Fred Drakebfc18bd2002-05-03 04:50:51 +00007# The emacs binary used to build the info docs. GNU Emacs 21 is required.
8EMACS=emacs
9
Fred Drake78104a91999-01-08 15:33:38 +000010MKINFO=$(TOOLSDIR)/mkinfo
Fred Drakebfc18bd2002-05-03 04:50:51 +000011SCRIPTS=$(TOOLSDIR)/checkargs.pm $(TOOLSDIR)/mkinfo $(TOOLSDIR)/py2texi.el
Fred Drake78104a91999-01-08 15:33:38 +000012
Fred Drakebfc18bd2002-05-03 04:50:51 +000013# 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
16VERSION=
Fred Drake47fd8fe1998-05-08 15:36:36 +000017
Fred Drakebfc18bd2002-05-03 04:50:51 +000018all: 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
Fred Drake47fd8fe1998-05-08 15:36:36 +000022
Fred Drakebfc18bd2002-05-03 04:50:51 +000023# python$(VERSION)-doc.info python$(VERSION)-inst.info
24# python$(VERSION)-mac.info
Fred Drake47fd8fe1998-05-08 15:36:36 +000025
Fred Drakebfc18bd2002-05-03 04:50:51 +000026check-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
Fred Drake47fd8fe1998-05-08 15:36:36 +000035
Fred Drakebfc18bd2002-05-03 04:50:51 +000036python$(VERSION)-api.info: ../api/api.tex $(SCRIPTS)
Fred Drake66abcee2002-11-13 19:31:04 +000037 EMACS=$(EMACS) $(MKINFO) $< $*.texi $@
Fred Drakebfc18bd2002-05-03 04:50:51 +000038
39python$(VERSION)-ext.info: ../ext/ext.tex $(SCRIPTS)
Fred Drake66abcee2002-11-13 19:31:04 +000040 EMACS=$(EMACS) $(MKINFO) $< $*.texi $@
Fred Drakebfc18bd2002-05-03 04:50:51 +000041
42python$(VERSION)-lib.info: ../lib/lib.tex $(SCRIPTS)
Fred Drake66abcee2002-11-13 19:31:04 +000043 EMACS=$(EMACS) $(MKINFO) $< $*.texi $@
Fred Drake47fd8fe1998-05-08 15:36:36 +000044
Fred Drakec5efde81999-01-27 18:30:16 +000045# Not built by default; the conversion doesn't really handle it well.
Fred Drakebfc18bd2002-05-03 04:50:51 +000046python$(VERSION)-mac.info: ../mac/mac.tex $(SCRIPTS)
Fred Drake66abcee2002-11-13 19:31:04 +000047 EMACS=$(EMACS) $(MKINFO) $< $*.texi $@
Fred Drake47fd8fe1998-05-08 15:36:36 +000048
Fred Drakebfc18bd2002-05-03 04:50:51 +000049python$(VERSION)-ref.info: ../ref/ref.tex $(SCRIPTS)
Fred Drake66abcee2002-11-13 19:31:04 +000050 EMACS=$(EMACS) $(MKINFO) $< $*.texi $@
Fred Drake47fd8fe1998-05-08 15:36:36 +000051
Fred Drakebfc18bd2002-05-03 04:50:51 +000052python$(VERSION)-tut.info: ../tut/tut.tex $(SCRIPTS)
Fred Drake66abcee2002-11-13 19:31:04 +000053 EMACS=$(EMACS) $(MKINFO) $< $*.texi $@
Fred Drake47fd8fe1998-05-08 15:36:36 +000054
Fred Drakebfc18bd2002-05-03 04:50:51 +000055# Not built by default; the conversion doesn't handle it at all.
56python$(VERSION)-doc.info: ../doc/doc.tex $(SCRIPTS)
Fred Drake66abcee2002-11-13 19:31:04 +000057 EMACS=$(EMACS) $(MKINFO) $< $*.texi $@
Fred Drakeca92eeb2000-10-26 19:26:47 +000058
Fred Drakebfc18bd2002-05-03 04:50:51 +000059python$(VERSION)-dist.info: ../dist/dist.tex $(SCRIPTS)
Fred Drake66abcee2002-11-13 19:31:04 +000060 EMACS=$(EMACS) $(MKINFO) $< $*.texi $@
Fred Drakebfc18bd2002-05-03 04:50:51 +000061
62# Not built by default; the conversion chokes on two @end multitable's
63python$(VERSION)-inst.info: ../inst/inst.tex $(SCRIPTS)
Fred Drake66abcee2002-11-13 19:31:04 +000064 EMACS=$(EMACS) $(MKINFO) $< $*.texi $@
Fred Drake8981fdf1998-05-11 19:54:57 +000065
66clean:
Fred Drake78104a91999-01-08 15:33:38 +000067 rm -f *.texi~ *.texi
Fred Drake8981fdf1998-05-11 19:54:57 +000068
69clobber: clean
Fred Drakebfc18bd2002-05-03 04:50:51 +000070 rm -f *.texi python*-*.info python*-*.info-[0-9]*