blob: 3dbbd747becd0360275761ca35037c3d11784d2d [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 \
Fred Drake6c85bcb2003-07-16 04:02:58 +000019 api dist ext mac ref tut whatsnew \
20 lib
21# doc inst
Fred Drake47fd8fe1998-05-08 15:36:36 +000022
Fred Drake6c85bcb2003-07-16 04:02:58 +000023api: python$(VERSION)-api.info
24dist: python$(VERSION)-dist.info
25doc: python$(VERSION)-doc.info
26ext: python$(VERSION)-ext.info
27inst: python$(VERSION)-inst.info
28lib: python$(VERSION)-lib.info
29mac: python$(VERSION)-mac.info
30ref: python$(VERSION)-ref.info
31tut: python$(VERSION)-tut.info
32whatsnew: $(WHATSNEW)
33$(WHATSNEW): python$(VERSION)-$(WHATSNEW).info
Fred Drake47fd8fe1998-05-08 15:36:36 +000034
Fred Drakebfc18bd2002-05-03 04:50:51 +000035check-emacs-version:
36 @v="`$(EMACS) --version 2>&1 | egrep '^(GNU |X)Emacs [12]*'`"; \
37 if `echo "$$v" | grep '^GNU Emacs 21' >/dev/null 2>&1`; then \
38 echo "Using $(EMACS) to build the info docs"; \
39 else \
40 echo "GNU Emacs 21 is required to build the info docs"; \
41 echo "Found $$v"; \
42 false; \
43 fi
Fred Drake47fd8fe1998-05-08 15:36:36 +000044
Fred Drakebfc18bd2002-05-03 04:50:51 +000045python$(VERSION)-api.info: ../api/api.tex $(SCRIPTS)
Fred Drake66abcee2002-11-13 19:31:04 +000046 EMACS=$(EMACS) $(MKINFO) $< $*.texi $@
Fred Drakebfc18bd2002-05-03 04:50:51 +000047
48python$(VERSION)-ext.info: ../ext/ext.tex $(SCRIPTS)
Fred Drake66abcee2002-11-13 19:31:04 +000049 EMACS=$(EMACS) $(MKINFO) $< $*.texi $@
Fred Drakebfc18bd2002-05-03 04:50:51 +000050
51python$(VERSION)-lib.info: ../lib/lib.tex $(SCRIPTS)
Fred Drake66abcee2002-11-13 19:31:04 +000052 EMACS=$(EMACS) $(MKINFO) $< $*.texi $@
Fred Drake47fd8fe1998-05-08 15:36:36 +000053
Fred Drakebfc18bd2002-05-03 04:50:51 +000054python$(VERSION)-mac.info: ../mac/mac.tex $(SCRIPTS)
Fred Drake66abcee2002-11-13 19:31:04 +000055 EMACS=$(EMACS) $(MKINFO) $< $*.texi $@
Fred Drake47fd8fe1998-05-08 15:36:36 +000056
Fred Drakebfc18bd2002-05-03 04:50:51 +000057python$(VERSION)-ref.info: ../ref/ref.tex $(SCRIPTS)
Fred Drake66abcee2002-11-13 19:31:04 +000058 EMACS=$(EMACS) $(MKINFO) $< $*.texi $@
Fred Drake47fd8fe1998-05-08 15:36:36 +000059
Fred Drakebfc18bd2002-05-03 04:50:51 +000060python$(VERSION)-tut.info: ../tut/tut.tex $(SCRIPTS)
Fred Drake66abcee2002-11-13 19:31:04 +000061 EMACS=$(EMACS) $(MKINFO) $< $*.texi $@
Fred Drake47fd8fe1998-05-08 15:36:36 +000062
Fred Drake6c85bcb2003-07-16 04:02:58 +000063# Not built by default; the conversion doesn't handle \p and \op
Fred Drakebfc18bd2002-05-03 04:50:51 +000064python$(VERSION)-doc.info: ../doc/doc.tex $(SCRIPTS)
Fred Drake66abcee2002-11-13 19:31:04 +000065 EMACS=$(EMACS) $(MKINFO) $< $*.texi $@
Fred Drakeca92eeb2000-10-26 19:26:47 +000066
Fred Drakebfc18bd2002-05-03 04:50:51 +000067python$(VERSION)-dist.info: ../dist/dist.tex $(SCRIPTS)
Fred Drake66abcee2002-11-13 19:31:04 +000068 EMACS=$(EMACS) $(MKINFO) $< $*.texi $@
Fred Drakebfc18bd2002-05-03 04:50:51 +000069
Fred Drake6c85bcb2003-07-16 04:02:58 +000070# Not built by default; the conversion chokes on \installscheme
Fred Drakebfc18bd2002-05-03 04:50:51 +000071python$(VERSION)-inst.info: ../inst/inst.tex $(SCRIPTS)
Fred Drake66abcee2002-11-13 19:31:04 +000072 EMACS=$(EMACS) $(MKINFO) $< $*.texi $@
Fred Drake8981fdf1998-05-11 19:54:57 +000073
Fred Drake6c85bcb2003-07-16 04:02:58 +000074# "whatsnew20" doesn't currently work
75python$(VERSION)-$(WHATSNEW).info: ../whatsnew/$(WHATSNEW).tex $(SCRIPTS)
76 EMACS=$(EMACS) $(MKINFO) $< $*.texi $@
77
Fred Drake8981fdf1998-05-11 19:54:57 +000078clean:
Fred Drake78104a91999-01-08 15:33:38 +000079 rm -f *.texi~ *.texi
Fred Drake8981fdf1998-05-11 19:54:57 +000080
81clobber: clean
Fred Drakebfc18bd2002-05-03 04:50:51 +000082 rm -f *.texi python*-*.info python*-*.info-[0-9]*