Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [rfa/doc] tex -> texindex -> tex -> texindex -> tex
@ 2002-01-21  0:35 Andrew Cagney
  2002-01-21  2:23 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Cagney @ 2002-01-21  0:35 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 950 bytes --]

Hello,

Noticed that the texinfo 4.0 doco mentions that, when building 
documentation, the sequence:

	tex
	texindex
	tex
	texindex
	tex

should be used.  The attached does this.

Ok?

Andrew

--

To summarize, this is a five step process:

   1. Run `tex' on your Texinfo file.  This generates a DVI file (with
      undefined cross-references and no indices), and the raw index files
      (with two letter extensions).

   2. Run `texindex' on the raw index files.  This creates the
      corresponding sorted index files (with three letter extensions).

   3. Run `tex' again on your Texinfo file.  This regenerates the DVI
      file, this time with indices and defined cross-references, but
      with page numbers for the cross-references from last time,
      generally incorrect.

   4. Sort the indices again, with `texindex'.

   5. Run `tex' one last time.  This time the correct page numbers are
      written for the cross-references.


[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 1754 bytes --]

2002-01-21  Andrew Cagney  <ac131313@redhat.com>

	* Makefile.in: Update copyright.
	(gdb.dvi, gdb.pdf, gdbint.dvi, gdbint.pdf): Use the sequence tex,
	texindex, tex, texindex, tex, when generating documents.

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/doc/Makefile.in,v
retrieving revision 1.17
diff -u -r1.17 Makefile.in
--- Makefile.in	2002/01/17 08:54:12	1.17
+++ Makefile.in	2002/01/21 08:28:53
@@ -1,4 +1,4 @@
-##Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000
+##Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2002
 ##Free Software Foundation, Inc.
 
 # Makefile for GDB documentation.
@@ -247,6 +247,7 @@
 		ln $(srcdir)/GDBvn.texi . || \
 		cp $(srcdir)/GDBvn.texi . ; else true; fi
 	$(SET_TEXINPUTS) $(TEX) gdb.texinfo
+	$(TEXINDEX) gdb.??
 	$(SET_TEXINPUTS) $(TEX) gdb.texinfo
 	$(TEXINDEX) gdb.??
 	$(SET_TEXINPUTS) $(TEX) gdb.texinfo
@@ -262,6 +263,7 @@
 		ln $(srcdir)/GDBvn.texi . || \
 		cp $(srcdir)/GDBvn.texi . ; else true; fi
 	$(SET_TEXINPUTS) $(PDFTEX) gdb.texinfo
+	$(TEXINDEX) gdb.??
 	$(SET_TEXINPUTS) $(PDFTEX) gdb.texinfo
 	$(TEXINDEX) gdb.??
 	$(SET_TEXINPUTS) $(PDFTEX) gdb.texinfo
@@ -375,6 +377,8 @@
 	$(SET_TEXINPUTS) $(TEX) gdbint.texinfo
 	$(TEXINDEX) gdbint.??
 	$(SET_TEXINPUTS) $(TEX) gdbint.texinfo
+	$(TEXINDEX) gdbint.??
+	$(SET_TEXINPUTS) $(TEX) gdbint.texinfo
 	rm -f gdbint.aux gdbint.cp* gdbint.fn* gdbint.ky* \
 		gdbint.log gdbint.pg* gdbint.toc gdbint.tp* gdbint.vr*
 
@@ -382,6 +386,8 @@
 	$(DVIPS) -o $@ $?
 
 gdbint.pdf: gdbint.dvi
+	$(SET_TEXINPUTS) $(PDFTEX) gdbint.texinfo
+	$(TEXINDEX) gdbint.??
 	$(SET_TEXINPUTS) $(PDFTEX) gdbint.texinfo
 	$(TEXINDEX) gdbint.??
 	$(SET_TEXINPUTS) $(PDFTEX) gdbint.texinfo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [rfa/doc] tex -> texindex -> tex -> texindex -> tex
  2002-01-21  0:35 [rfa/doc] tex -> texindex -> tex -> texindex -> tex Andrew Cagney
@ 2002-01-21  2:23 ` Eli Zaretskii
  2002-01-21 10:59   ` Andrew Cagney
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2002-01-21  2:23 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches


On Mon, 21 Jan 2002, Andrew Cagney wrote:

> Noticed that the texinfo 4.0 doco mentions that, when building 
> documentation, the sequence:
> 
> 	tex
> 	texindex
> 	tex
> 	texindex
> 	tex
> 
> should be used.  The attached does this.

Which begs a question: why don't we use texi2dvi, like God intended?  
I've seen quite a few documents where the tex/texindex duet is run 
more than 2 times, until the indices converge.  Why should we 
second-guess a well-established tool such as texi2dvi?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [rfa/doc] tex -> texindex -> tex -> texindex -> tex
  2002-01-21  2:23 ` Eli Zaretskii
@ 2002-01-21 10:59   ` Andrew Cagney
  2002-01-21 14:51     ` Andrew Cagney
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Cagney @ 2002-01-21 10:59 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb-patches

> On Mon, 21 Jan 2002, Andrew Cagney wrote:
> 
> 
>> Noticed that the texinfo 4.0 doco mentions that, when building 
>> documentation, the sequence:
>> 
>> tex
>> texindex
>> tex
>> texindex
>> tex
>> 
>> should be used.  The attached does this.
> 
> 
> Which begs a question: why don't we use texi2dvi, like God intended?  
> I've seen quite a few documents where the tex/texindex duet is run 
> more than 2 times, until the indices converge.  Why should we 
> second-guess a well-established tool such as texi2dvi?


Lost in history I suspect (I do remember very early on finding texi2dvi 
unreliable or nonexistant?).

BTW, how do I get texi2dvi to run pdftex.

Andrew


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [rfa/doc] tex -> texindex -> tex -> texindex -> tex
  2002-01-21 10:59   ` Andrew Cagney
@ 2002-01-21 14:51     ` Andrew Cagney
  2002-01-22  0:59       ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Cagney @ 2002-01-21 14:51 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Andrew Cagney, gdb-patches

[-- Attachment #1: Type: text/plain, Size: 135 bytes --]

> BTW, how do I get texi2dvi to run pdftex.


Found it, burried in the output from ``texi2dvi --help''.
How is the attached?

Andrew



[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 3904 bytes --]

2002-01-21  Andrew Cagney  <ac131313@redhat.com>

	* Makefile.in: Update copyright.
	(TEXI2DVI): Define.
	(gdb.dvi, gdb.pdf, stabs.dvi, stabs.pdf): Use TEXI2DVI.
	(gdbint.dvi, gdbint.pdf): Use TEXI2DVI.  Add dependency on
	gdb-cfg.texi.
	(TEXINDEX, PDFTEX): Delete makefile variables.

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/doc/Makefile.in,v
retrieving revision 1.17
diff -u -r1.17 Makefile.in
--- Makefile.in	2002/01/17 08:54:12	1.17
+++ Makefile.in	2002/01/21 22:49:24
@@ -1,4 +1,4 @@
-##Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000
+##Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2002
 ##Free Software Foundation, Inc.
 
 # Makefile for GDB documentation.
@@ -53,6 +53,9 @@
 # where to find texi2roff, ditto
 TEXI2ROFF=texi2roff
 
+# where to find texi2dvi, ditto
+TEXI2DVI=texi2dvi
+
 # Where is the source dir for the READLINE library doc?  
 # Traditionally readline is in .. or .
 READLINE_DIR = ${gdbdir}/../readline/doc
@@ -90,15 +93,9 @@
 # Don Knuth's TeX formatter
 TEX = tex
 
-# auxiliary program for sorting Texinfo indices
-TEXINDEX = texindex
-
 # Program to generate Postscript files from DVI files.
 DVIPS = dvips
 
-# Program to generate PDF files from tex files.
-PDFTEX = pdftex
-
 # Main GDB manual's source files
 SFILES_INCLUDED = gdb-cfg.texi $(srcdir)/annotate.texi $(srcdir)/fdl.texi
 
@@ -246,10 +243,7 @@
 		(test "$$LN_S" = "ln -s" && ln -s $(srcdir)/GDBvn.texi .) || \
 		ln $(srcdir)/GDBvn.texi . || \
 		cp $(srcdir)/GDBvn.texi . ; else true; fi
-	$(SET_TEXINPUTS) $(TEX) gdb.texinfo
-	$(SET_TEXINPUTS) $(TEX) gdb.texinfo
-	$(TEXINDEX) gdb.??
-	$(SET_TEXINPUTS) $(TEX) gdb.texinfo
+	$(SET_TEXINPUTS) $(TEXI2DVI) $(srcdir)/gdb.texinfo
 	rm -f gdb.aux gdb.cp* gdb.fn* gdb.ky* gdb.log gdb.pg* gdb.toc \
 		gdb.tp* gdb.vr*
 
@@ -261,10 +255,7 @@
 		(test "$$LN_S" = "ln -s" && ln -s $(srcdir)/GDBvn.texi .) || \
 		ln $(srcdir)/GDBvn.texi . || \
 		cp $(srcdir)/GDBvn.texi . ; else true; fi
-	$(SET_TEXINPUTS) $(PDFTEX) gdb.texinfo
-	$(SET_TEXINPUTS) $(PDFTEX) gdb.texinfo
-	$(TEXINDEX) gdb.??
-	$(SET_TEXINPUTS) $(PDFTEX) gdb.texinfo
+	$(SET_TEXINPUTS) $(TEXI2DVI) --pdf $(srcdir)/gdb.texinfo
 	rm -f gdb.aux gdb.cp* gdb.fn* gdb.ky* gdb.log gdb.pg* gdb.toc \
 		gdb.tp* gdb.vr*
 
@@ -371,20 +362,16 @@
 	$(MAKEHTML) $(MAKEHTMLFLAGS) -I ${READLINE_DIR} -I ${GDBMI_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo
 
 # GDB INTERNALS MANUAL: TeX dvi file
-gdbint.dvi : gdbint.texinfo
-	$(SET_TEXINPUTS) $(TEX) gdbint.texinfo
-	$(TEXINDEX) gdbint.??
-	$(SET_TEXINPUTS) $(TEX) gdbint.texinfo
+gdbint.dvi: gdbint.texinfo gdb-cfg.texi
+	$(SET_TEXINPUTS) $(TEXI2DVI) $(srcdir)/gdbint.texinfo
 	rm -f gdbint.aux gdbint.cp* gdbint.fn* gdbint.ky* \
 		gdbint.log gdbint.pg* gdbint.toc gdbint.tp* gdbint.vr*
 
 gdbint.ps : gdbint.dvi
 	$(DVIPS) -o $@ $?
 
-gdbint.pdf: gdbint.dvi
-	$(SET_TEXINPUTS) $(PDFTEX) gdbint.texinfo
-	$(TEXINDEX) gdbint.??
-	$(SET_TEXINPUTS) $(PDFTEX) gdbint.texinfo
+gdbint.pdf: gdbint.dvi gdb-cfg.texi
+	$(SET_TEXINPUTS) $(TEXI2DVI) --pdf $(srcdir)/gdbint.texinfo
 	rm -f gdbint.aux gdbint.cp* gdbint.fn* gdbint.ky* \
 		gdbint.log gdbint.pg* gdbint.toc gdbint.tp* gdbint.vr*
 
@@ -408,9 +395,7 @@
 
 # STABS DOCUMENTATION: TeX dvi file
 stabs.dvi : stabs.texinfo
-	$(SET_TEXINPUTS) $(TEX) stabs.texinfo
-	$(TEXINDEX) stabs.??
-	$(SET_TEXINPUTS) $(TEX) stabs.texinfo
+	$(SET_TEXINPUTS) $(TEXI2DVI) $(srcdir)/stabs.texinfo
 	rm -f stabs.aux stabs.cp* stabs.fn* stabs.ky* \
 		stabs.log stabs.pg* stabs.toc stabs.tp* stabs.vr*
 
@@ -418,9 +403,7 @@
 	$(DVIPS) -o $@ $?
 
 stabs.pdf: stabs.dvi
-	$(SET_TEXINPUTS) $(PDFTEX) stabs.texinfo
-	$(TEXINDEX) stabs.??
-	$(SET_TEXINPUTS) $(PDFTEX) stabs.texinfo
+	$(SET_TEXINPUTS) $(TEXI2DVI) --pdf $(srcdir)/stabs.texinfo
 	rm -f stabs.aux stabs.cp* stabs.fn* stabs.ky* \
 		stabs.log stabs.pg* stabs.toc stabs.tp* stabs.vr*
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [rfa/doc] tex -> texindex -> tex -> texindex -> tex
  2002-01-21 14:51     ` Andrew Cagney
@ 2002-01-22  0:59       ` Eli Zaretskii
  2002-01-22  8:37         ` Andrew Cagney
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2002-01-22  0:59 UTC (permalink / raw)
  To: ac131313; +Cc: gdb-patches

> Date: Mon, 21 Jan 2002 17:50:58 -0500
> From: Andrew Cagney <ac131313@cygnus.com>
> 
> > BTW, how do I get texi2dvi to run pdftex.
> 
> Found it, burried in the output from ``texi2dvi --help''.
> How is the attached?

Great, thanks!  Please commit it.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [rfa/doc] tex -> texindex -> tex -> texindex -> tex
  2002-01-22  0:59       ` Eli Zaretskii
@ 2002-01-22  8:37         ` Andrew Cagney
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Cagney @ 2002-01-22  8:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb-patches

> Date: Mon, 21 Jan 2002 17:50:58 -0500
>> From: Andrew Cagney <ac131313@cygnus.com>
>> 
> 
>> > BTW, how do I get texi2dvi to run pdftex.
> 
>> 
>> Found it, burried in the output from ``texi2dvi --help''.
>> How is the attached?
> 
> 
> Great, thanks!  Please commit it.


Done.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-01-22 16:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-21  0:35 [rfa/doc] tex -> texindex -> tex -> texindex -> tex Andrew Cagney
2002-01-21  2:23 ` Eli Zaretskii
2002-01-21 10:59   ` Andrew Cagney
2002-01-21 14:51     ` Andrew Cagney
2002-01-22  0:59       ` Eli Zaretskii
2002-01-22  8:37         ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox