Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@vmware.com>
To: "Joseph S. Myers" <joseph@codesourcery.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: Use makeinfo --html for HTML manuals
Date: Fri, 17 Apr 2009 21:02:00 -0000	[thread overview]
Message-ID: <49E8ED2D.9090000@vmware.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0904172038520.12227@digraph.polyomino.org.uk>

Joseph S. Myers wrote:
> This patch makes the GDB makefiles build HTML manuals using makeinfo
> --html instead of texi2html.  This has the following advantages:
> 
> * makeinfo --html is the standard approach used by GNU software, so
>   links between different manuals are more likely to work when
>   makeinfo --html is used, manuals will appear more uniform and the
>   Texinfo language implementation in makeinfo --html is more likely to
>   be in sync with that used for other output formats.
> 
> * With texi2html (at least some versions), "make install-html" was
>   broken because the files were not built under the expected names;
>   this illustrates that texi2html has changed its behavior
>   incompatibly in the past in ways making it problematic for the
>   makefiles to allow for different versions.
> 
> The install-html rules for makeinfo --html output are taken from those
> generated by automake, just as the install-pdf rules already present
> were.
> 
> With regard to the removed comment about lack of split-file HTML
> support in makeinfo 4.0, split-file output has been supported since
> 4.1, and the toplevel configure script requires makeinfo 4.7 (released
> April 2004) as the minimum version for the src repository so all
> supported makeinfo versions will generate split-file HTML output.
> 
> Tested with "make install-html".  OK to commit?

Eli's area, but I think it sounds great!


> 
> gdb:
> 2009-04-17  Carlos O'Donell  <carlos@codesourcery.com>
> 
> 	* Makefile.in (MAKEHTML): Set to makeinfo --html.
> 	(MAKEHTMLFLAGS): Set to empty.
> 
> gdb/doc:
> 2009-04-17  Carlos O'Donell  <carlos@codesourcery.com>
>             Joseph Myers  <joseph@codesourcery.com>
> 
> 	* Makefile.in (MAKEHTML): Set to makeinfo --html.
> 	(MAKEHTMLFLAGS): Set to empty.
> 	(html__strip_dir): Define.
> 	(HTMLFILES): Define.
> 	(HTMLFILES_INSTALL): Define.
> 	(install-html): Copy new automake rule.
> 	(html): Depend on $(HTMLFILES).
> 	(gdb_toc.html): Rename to gdb/index.html.
> 	(gdbint_toc.html): Rename to gdbint/index.html.
> 	(stabs_toc.html): Rename to stabs/index.html.
> 	(annotate_toc.html): Rename to annotate/index.html.
> 
> Index: gdb/Makefile.in
> ===================================================================
> RCS file: /cvs/src/src/gdb/Makefile.in,v
> retrieving revision 1.1077
> diff -u -r1.1077 Makefile.in
> --- gdb/Makefile.in	17 Apr 2009 17:44:03 -0000	1.1077
> +++ gdb/Makefile.in	17 Apr 2009 20:27:47 -0000
> @@ -111,11 +111,8 @@
>  # where to find makeinfo, preferably one designed for texinfo-2
>  MAKEINFO=makeinfo
>  
> -# Contrary to documentation, the current directory is not
> -# searched by texi2html, so specify it explicitly.
> -# -macro 2007-07-26
> -MAKEHTML = texi2html
> -MAKEHTMLFLAGS = -menu -split_chapter -I .
> +MAKEHTML = $(MAKEINFO) --html
> +MAKEHTMLFLAGS =
>  
>  # Set this up with gcc if you have gnu ld and the loader will print out
>  # line numbers for undefined references.
> Index: gdb/doc/Makefile.in
> ===================================================================
> RCS file: /cvs/src/src/gdb/doc/Makefile.in,v
> retrieving revision 1.44
> diff -u -r1.44 Makefile.in
> --- gdb/doc/Makefile.in	17 Apr 2009 17:44:05 -0000	1.44
> +++ gdb/doc/Makefile.in	17 Apr 2009 20:27:47 -0000
> @@ -46,14 +46,8 @@
>  # where to find makeinfo, preferably one designed for texinfo-2
>  MAKEINFO=makeinfo
>  
> -# Note that texinfo 4.0's makeinfo --html can only generate a
> -# single file, which would be too large, so continue to use
> -# texi2html. -sts 2000-03-28
> -# Contrary to documentation, the current directory is not
> -# searched by texi2html, so specify it explicitly.
> -# -macro 2007-07-26
> -MAKEHTML = texi2html
> -MAKEHTMLFLAGS = -menu -split_chapter -I .
> +MAKEHTML = $(MAKEINFO) --html 
> +MAKEHTMLFLAGS =
>  
>  # where to find texi2roff, ditto
>  TEXI2ROFF=texi2roff
> @@ -80,6 +74,9 @@
>  
>  # Files which should be generated via 'pdf' and installed by 'install-pdf'
>  PDFFILES = gdb.pdf gdbint.pdf stabs.pdf refcard.pdf annotate.pdf
> +# Files which should be generated via 'html' and installed by 'install-html'
> +HTMLFILES =  gdb/index.html gdbint/index.html stabs/index.html annotate/index.html
> +HTMLFILES_INSTALL = gdb gdbint stabs annotate
>  
>  # There may be alternate predefined collections of switches to configure
>  # the GDB manual.  Normally this is not done in synch with the software
> @@ -163,7 +160,7 @@
>  info: $(INFO_DEPS)
>  dvi: gdb.dvi gdbint.dvi stabs.dvi refcard.dvi annotate.dvi
>  ps: gdb.ps gdbint.ps stabs.ps refcard.ps annotate.ps
> -html: gdb_toc.html gdbint_toc.html stabs_toc.html annotate_toc.html
> +html: $(HTMLFILES)
>  pdf: $(PDFFILES)
>  all-doc: info dvi ps # pdf
>  diststuff: info
> @@ -205,9 +202,23 @@
>  	  (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
>  	done
>  
> -install-html: html
> -	for i in *.html ; do \
> -		$(INSTALL_DATA) $$i $(DESTDIR)$(htmldir)/$$i ; \
> +html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
> +
> +install-html: $(HTMLFILES)
> +	@$(NORMAL_INSTALL)
> +	test -z "$(htmldir)" || $(mkinstalldirs) "$(DESTDIR)$(htmldir)"
> +	@list='$(HTMLFILES_INSTALL)'; for p in $$list; do \
> +	  if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
> +	  f=$(html__strip_dir) \
> +	  if test -d "$$d$$p"; then \
> +	    echo " $(mkinstalldirs) '$(DESTDIR)$(htmldir)/$$f'"; \
> +	    $(mkinstalldirs) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
> +	    echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
> +	    $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
> +	  else \
> +	    echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
> +	    $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
> +	  fi; \
>  	done
>  
>  pdf__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
> @@ -417,7 +428,7 @@
>  
>  # GDB MANUAL: HTML file
>  
> -gdb_toc.html: ${GDB_DOC_FILES}
> +gdb/index.html: ${GDB_DOC_FILES}
>  	$(MAKEHTML) $(MAKEHTMLFLAGS) -I ${READLINE_DIR} -I ${GDBMI_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo
>  
>  # Clean these up before each run.  Avoids a catch 22 with not being
> @@ -445,7 +456,7 @@
>  
>  # GDB INTERNALS MANUAL: HTML file
>  
> -gdbint_toc.html: $(GDBINT_DOC_FILES)
> +gdbint/index.html: $(GDBINT_DOC_FILES)
>  	$(MAKEHTML) $(MAKEHTMLFLAGS) $(srcdir)/gdbint.texinfo
>  
>  stabs.info: $(STABS_DOC_FILES)
> @@ -453,7 +464,7 @@
>  
>  # STABS DOCUMENTATION: HTML file
>  
> -stabs_toc.html: $(STABS_DOC_FILES)
> +stabs/index.html: $(STABS_DOC_FILES)
>  	$(MAKEHTML) $(MAKEHTMLFLAGS) $(srcdir)/stabs.texinfo
>  
>  # Clean these up before each run.  Avoids a catch 22 with not being
> @@ -495,7 +506,7 @@
>  annotate.info: $(ANNOTATE_DOC_FILES)
>  	$(MAKEINFO)  -I $(srcdir) -o annotate.info $(srcdir)/annotate.texinfo
>  
> -annotate_toc.html: $(ANNOTATE_DOC_FILES)
> +annotate/index.html: $(ANNOTATE_DOC_FILES)
>  	$(MAKEHTML) $(MAKEHTMLFLAGS) $(srcdir)/annotate.texinfo
>  
>  force:
> 


  reply	other threads:[~2009-04-17 21:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-17 20:40 Joseph S. Myers
2009-04-17 21:02 ` Michael Snyder [this message]
2009-04-18 16:36 ` Eli Zaretskii
2009-04-18 17:15   ` Joseph S. Myers
2009-04-20 19:23     ` Carlos O'Donell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49E8ED2D.9090000@vmware.com \
    --to=msnyder@vmware.com \
    --cc=gdb-patches@sourceware.org \
    --cc=joseph@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox