diff --git a/Doc/Makefile b/Doc/Makefile index 6c2afb1e1c4..9595fcabbc9 100644 --- a/Doc/Makefile +++ b/Doc/Makefile @@ -58,6 +58,8 @@ L2H= /ufs/guido/l2h/latex2html L2HARGS= -address $$USER@`domainname` -dont_include myformat # Destination directory for output of libwww target. +PARTPARSE= $(PYTHON) ./partparse.pyc +TEXI2HTML= $(PYTHON) ./texi2html.pyc LIBHTMLDIR= ./python-lib # Install destination -- not used now but might be useful some time... @@ -165,22 +167,27 @@ qua.ps: qua.dvi # The remaining part of the Makefile is concerned with various # conversions, as described above. See also the README file. -lib.texi: lib*.tex texipre.dat texipost.dat partparse.py fix.el - $(PYTHON) partparse.py -o @lib.texi `./whichlibs` - $(EMACS) -batch -l fix.el -f save-buffer -kill - mv @lib.texi lib.texi +.SUFFIXES: .py .pyc + +.py.pyc: + $(PYTHON) -c "import $*" .PRECIOUS: lib.texi +lib.texi: lib*.tex texipre.dat texipost.dat partparse.pyc fix.el + $(PARTPARSE) -o @lib.texi `./whichlibs` + $(EMACS) -batch -l fix.el -f save-buffer -kill + mv @lib.texi lib.texi + python-lib.info: lib.texi -$(MAKEINFO) --footnote-style end --fill-column 72 \ --paragraph-indent 0 lib.texi lib.info: python-lib.info -libwww: lib.texi +libwww: lib.texi texi2html.pyc if test ! -d $(LIBHTMLDIR); then mkdir $(LIBHTMLDIR); else true; fi - $(PYTHON) texi2html.py -d lib.texi $(LIBHTMLDIR) + $(TEXI2HTML) -d lib.texi $(LIBHTMLDIR) # Targets to convert the manuals to HTML using Nikos Drakos' LaTeX to # HTML converter. For more info on this program, see diff --git a/Doc/texi2html.py b/Doc/texi2html.py index 50842842579..c24a01925e5 100644 --- a/Doc/texi2html.py +++ b/Doc/texi2html.py @@ -48,7 +48,7 @@ kwprog = regex.compile('@[a-z]+') # Keyword (embedded, usually with {} args) spprog = regex.compile('[\n@{}&<>]') # Special characters in running text miprog = regex.compile( \ '^\* \([^:]*\):\(:\|[ \t]*\([^\t,\n.]+\)\([^ \t\n]*\)\)[ \t\n]*') - # menu item (Yuck!) + # menu item (Yuck!) class Node: @@ -57,7 +57,7 @@ class Node: A Node accumulates its contents, takes care of links to other Nodes and saves itself when it is finished and all links are resolved. """ - + def __init__ (self, dir, name, topname, title, next, prev, up): self.dirname = dir self.name = name @@ -72,7 +72,7 @@ class Node: self.lines = [] self.type = 0 self.cont = '' - + def write (self, *lines): map(self.lines.append, lines) @@ -83,7 +83,7 @@ class Node: fp.write (self.epilogue) fp.close () - + def link(self, label, nodename): if nodename: if string.lower(nodename) == '(dir)': @@ -93,7 +93,7 @@ class Node: self.write(label, ': ', nodename, ' \n') - + def finalize(self): length = len (self.lines) self.text = string.joinfields (self.lines, '') @@ -109,1317 +109,1317 @@ class Node: self.write ('
\n%s\n' % links else: self.epilogue = '