|
1 | 1 | # Generate the Python "info" documentation. |
2 | 2 |
|
3 | | -# These is only used for .info generation: |
4 | | -EMACS= emacs |
5 | | -MAKEINFO= makeinfo |
6 | | -PYTHON= python |
7 | | -PARTPARSE= $(PYTHON) ../tools/partparse.py |
| 3 | +PAPER=letter |
| 4 | +TOPDIR=.. |
| 5 | +TOOLSDIR=$(TOPDIR)/tools |
| 6 | +PAPERDIR=$(TOPDIR)/paper-$(PAPER) |
| 7 | +HTMLDIR=$(TOPDIR)/html |
8 | 8 |
|
| 9 | +MKINFO=$(TOOLSDIR)/mkinfo |
| 10 | +SCRIPTS=$(TOOLSDIR)/html2texi.pl $(TOOLSDIR)/checkargs.pm $(TOOLSDIR)/mkinfo |
9 | 11 |
|
10 | | -all: python-lib.info |
| 12 | +all: python-api.info python-ext.info python-lib.info \ |
| 13 | + python-mac.info python-ref.info python-tut.info |
11 | 14 |
|
12 | 15 |
|
13 | | -.PRECIOUS: python-lib.texi |
| 16 | +python-api.info: $(HTMLDIR)/api/api.html $(SCRIPTS) |
| 17 | + $(MKINFO) $< |
14 | 18 |
|
15 | | -# The sed script in this target fixes a really nasty little condition in |
16 | | -# libcgi.tex where \e has to be used in a group to get the right behavior, |
17 | | -# and makeinfo can't handle a group without a leading @command. But at |
18 | | -# least the info file gets generated. |
| 19 | +python-ext.info: $(HTMLDIR)/ext/ext.html $(SCRIPTS) |
| 20 | + $(MKINFO) $< |
19 | 21 |
|
20 | | -lib1.texi: $(LIBFILES) texipre.dat texipost.dat ../tools/partparse.py |
21 | | - $(PARTPARSE) -o $@ `../tools/whichlibs` |
22 | | - sed 's/"{\\}n{\\}n/"\\n\\n/' $@ >temp.texi |
23 | | - mv temp.texi $@ |
| 22 | +python-lib.info: $(HTMLDIR)/lib/lib.html $(SCRIPTS) |
| 23 | + $(MKINFO) $< |
24 | 24 |
|
25 | | -python-lib.texi: lib1.texi ../tools/fix.el |
26 | | - cp lib1.texi temp.texi |
27 | | - $(EMACS) -batch -l ../tools/fix.el -f save-buffer -kill |
28 | | - mv temp.texi $@ |
| 25 | +python-mac.info: $(HTMLDIR)/mac/mac.html $(SCRIPTS) |
| 26 | + $(MKINFO) $< |
| 27 | + |
| 28 | +python-ref.info: $(HTMLDIR)/ref/ref.html $(SCRIPTS) |
| 29 | + $(MKINFO) $< |
| 30 | + |
| 31 | +python-tut.info: $(HTMLDIR)/tut/tut.html $(SCRIPTS) |
| 32 | + $(MKINFO) $< |
29 | 33 |
|
30 | | -python-lib.info: python-lib.texi |
31 | | - $(MAKEINFO) --footnote-style end --fill-column 72 \ |
32 | | - --paragraph-indent 0 $< |
33 | 34 |
|
34 | 35 | clean: |
35 | | - rm -f *~ *.texi |
| 36 | + rm -f *.texi~ *.texi |
36 | 37 |
|
37 | 38 | clobber: clean |
38 | | - rm -f *.texi python-???.info python-???.info-[0-9]* |
| 39 | + rm -f *.texi python-*.info python-*.info-[0-9]* |
| 40 | + |
| 41 | + |
| 42 | +# The HTML files are dependent on the .aux files, which are dependent on the |
| 43 | +# LaTeX source documents. This makes sure we can build info files from a |
| 44 | +# "clean" tree: |
| 45 | + |
| 46 | +$(HTMLDIR)/api/api.html: $(PAPERDIR)/api.aux $(BUILDINDEX) |
| 47 | + (cd $(TOPDIR); $(MAKE) htmlapi) |
| 48 | + |
| 49 | +$(HTMLDIR)/ext/ext.html: $(PAPERDIR)/ext.aux |
| 50 | + (cd $(TOPDIR); $(MAKE) htmlext) |
| 51 | + |
| 52 | +$(HTMLDIR)/lib/lib.html: $(PAPERDIR)/lib.aux $(BUILDINDEX) |
| 53 | + (cd $(TOPDIR); $(MAKE) htmllib) |
| 54 | + |
| 55 | +$(HTMLDIR)/mac/mac.html: $(MACFILES) $(BUILDINDEX) |
| 56 | + (cd $(TOPDIR); $(MAKE) htmlmac) |
| 57 | + |
| 58 | +$(HTMLDIR)/ref/ref.html: $(PAPERDIR)/ref.aux $(BUILDINDEX) |
| 59 | + (cd $(TOPDIR); $(MAKE) htmlref) |
| 60 | + |
| 61 | +$(HTMLDIR)/tut/tut.html: $(PAPERDIR)/tut.aux |
| 62 | + (cd $(TOPDIR); $(MAKE) htmltut) |
| 63 | + |
| 64 | + |
| 65 | +include ../Makefile.deps |
| 66 | + |
| 67 | +$(PAPERDIR)/api.aux: $(APIFILES) |
| 68 | + (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) api.dvi) |
| 69 | + |
| 70 | +$(PAPERDIR)/ext.aux: $(EXTFILES) |
| 71 | + (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) ext.dvi) |
| 72 | + |
| 73 | +$(PAPERDIR)/lib.aux: $(LIBFILES) |
| 74 | + (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) lib.dvi) |
| 75 | + |
| 76 | +$(PAPERDIR)/ref.aux: $(REFFILES) |
| 77 | + (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) ref.dvi) |
| 78 | + |
| 79 | +$(PAPERDIR)/tut.aux: $(TUTFILES) |
| 80 | + (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) tut.dvi) |
0 commit comments