[Python-checkins] CVS: python/dist/src/Doc/tools mkhowto,1.16,1.17

Fred L. Drake python-dev@python.org
Tue, 19 Sep 2000 22:49:13 -0700


Update of /cvsroot/python/python/dist/src/Doc/tools
In directory slayer.i.sourceforge.net:/tmp/cvs-serv30175

Modified Files:
	mkhowto 
Log Message:

.use_latex():  Make this a little smarter so that it only runs pdflatex
               once if all the temporary files are available from building
               a DVI file.  This can avoid two runs of pdflatex.


Index: mkhowto
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkhowto,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** mkhowto	2000/09/14 22:25:47	1.16
--- mkhowto	2000/09/20 05:49:09	1.17
***************
*** 277,300 ****
      def use_latex(self, binary):
          self.require_temps(binary=binary)
!         if os.path.isfile("mod%s.idx" % self.doc):
!             self.run("%s mod%s.idx" % (MAKEINDEX_BINARY, self.doc))
!         if os.path.isfile(self.doc + ".idx"):
!             # call to Doc/tools/fix_hack omitted; doesn't appear necessary
!             self.run("%s %s.idx" % (MAKEINDEX_BINARY, self.doc))
!             import indfix
!             indfix.process(self.doc + ".ind")
!         if self.use_bibtex:
!             self.run("%s %s" % (BIBTEX_BINARY, self.doc))
!         self.process_synopsis_files()
!         #
!         # let the doctype-specific handler do some intermediate work:
          #
-         if self.doctype == "manual":
-             self.use_latex_manual(binary=binary)
-         elif self.doctype == "howto":
-             self.use_latex_howto(binary=binary)
-         else:
-             raise RuntimeError, "unsupported document type: " + self.doctype
-         #
          # and now finish it off:
          #
--- 277,304 ----
      def use_latex(self, binary):
          self.require_temps(binary=binary)
!         if self.latex_runs < 2:
!             if os.path.isfile("mod%s.idx" % self.doc):
!                 self.run("%s mod%s.idx" % (MAKEINDEX_BINARY, self.doc))
!             if os.path.isfile(self.doc + ".idx"):
!                 # call to Doc/tools/fix_hack omitted; doesn't appear necessary
!                 self.run("%s %s.idx" % (MAKEINDEX_BINARY, self.doc))
!                 import indfix
!                 indfix.process(self.doc + ".ind")
!             if self.use_bibtex:
!                 self.run("%s %s" % (BIBTEX_BINARY, self.doc))
!             self.process_synopsis_files()
!             #
!             # let the doctype-specific handler do some intermediate work:
!             #
!             self.run("%s %s" % (binary, self.doc))
!             self.latex_runs += 1
!             if os.path.isfile("mod%s.idx" % self.doc):
!                 self.run("%s -s %s mod%s.idx"
!                          % (MAKEINDEX_BINARY, ISTFILE, self.doc))
!             if os.path.isfile(self.doc + ".idx"):
!                 self.run("%s -s %s %s.idx"
!                          % (MAKEINDEX_BINARY, ISTFILE, self.doc))
!             self.process_synopsis_files()
          #
          # and now finish it off:
          #
***************
*** 308,324 ****
          if self.use_bibtex:
              self.run("%s %s" % (BIBTEX_BINARY, self.doc))
-         self.run("%s %s" % (binary, self.doc))
- 
-     def use_latex_howto(self, binary):
          self.run("%s %s" % (binary, self.doc))
!         if os.path.isfile("mod%s.idx" % self.doc):
!             self.run("%s -s %s mod%s.idx"
!                      % (MAKEINDEX_BINARY, ISTFILE, self.doc))
!         if os.path.isfile(self.doc + ".idx"):
!             self.run("%s -s %s %s.idx" % (MAKEINDEX_BINARY, ISTFILE, self.doc))
!         self.process_synopsis_files()
! 
!     def use_latex_manual(self, binary):
!         self.use_latex_howto(binary)
  
      def process_synopsis_files(self):
--- 312,317 ----
          if self.use_bibtex:
              self.run("%s %s" % (BIBTEX_BINARY, self.doc))
          self.run("%s %s" % (binary, self.doc))
!         self.latex_runs += 1
  
      def process_synopsis_files(self):