# Makefile for Python 5.6 Info files. # Omit "tut" because the html2texi script assumes that each (sub)section is # in a separate HTML file, but the tutorial puts entire chapters in single # HTML files. # MANUALS := api ext lib mac ref tut MANUALS := api ext lib mac ref TEXI_FILES := $(patsubst %,python-%.texi,$(MANUALS)) INFO_FILES := $(patsubst %,python-%.info,$(MANUALS)) # To build the Python Info files: # 1. Link or copy this file, as "Makefile", into wherever the Python HTML # files appear; for example, .../Python/Doc/html/. # 2. make texi # 3. Edit the generated .texi files if desired. For instance, # * restore images skipped over by html2info. # Example: insert "sqrt(sum(Si^2)/n)" after "Return the # root-mean-square of the fragment, i.e." in python-lib.texi. # (This should be automated, or the LaTeX modified to produce # better HTML.) # * perhaps remove the @detailmenu ... @end detailmenu # 4. make info # 5. make tgz (to make a tar archive of the Info files) all: info # Rule from .texi to .info is built in. info: $(INFO_FILES) texi: $(TEXI_FILES) # No sources in these rules: I rarely want these regenerated automatically. # This Emacs expression does the following: # * change @setfilename to prefix "python-" # * fix up any sectioning, such as for Abstract # * make Texinfo menus EMACS_ACTION := '(progn (goto-char (point-min)) (while (re-search-forward "\\(@setfilename \\)\\([-a-z]*\\)\n" nil t) (replace-match "\\1python-\\2.info\n")) (while (search-forward "@node Front Matter\n@chapter Abstract\n" nil t) (replace-match "@node Abstract\n@section Abstract\n" nil t)) (progn (mark-whole-buffer) (texinfo-master-menu (quote update-all-nodes))) (save-buffer))' # Remove some spurious HTML markup. # Some or all of these should be fixed in the original LaTeX source or the # LaTeX2HTML conversion. CLEANUP_HTML := perl -pi.bak -e '$$/=""; s/