Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Joseph S. Myers" <joseph@codesourcery.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Carlos O'Donell <carlos@codesourcery.com>, gdb-patches@sourceware.org
Subject: Re: install-html and install-pdf improvements
Date: Tue, 21 Apr 2009 12:45:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.0904211244270.16159@digraph.polyomino.org.uk> (raw)
In-Reply-To: <83vdozgi3r.fsf@gnu.org>

On Mon, 20 Apr 2009, Eli Zaretskii wrote:

> > Date: Mon, 20 Apr 2009 15:50:36 -0400
> > From: Carlos O'Donell <carlos@codesourcery.com>
> > CC: Eli Zaretskii <eliz@gnu.org>,  gdb-patches@sourceware.org
> > 
> > The goal was to take a step towards behaving like the newer autoconf
> > would behave, and to allow independent configuration for each directory.
> > 
> > There should be values of docdir and datarootdir defined in
> > gdb/doc/Makefile.in, and if not specified, the values of pdfdir and
> > htmldir should be set to defaults as defined in the GNU Coding Standard.
> > 
> > The patch does not implement this last requirement, but that was the idea.
> 
> Thanks for the explanations.
> 
> Is it possible to do this as you describe, including the last
> requirement?  I'd prefer to have a setup with no lose ends, because a
> year from now, none of us is likely to remember what we intended to
> do, and someone some day will wonder what is this all about.

This followup patch adds the --with-datarootdir, --with-docdir,
--with-pdfdir and --with-htmldir configure options from toplevel to
both the gdb and gdb/doc directories for independent configurability,
adds the missing directory variables to gdb/doc/Makefile.in, and
arranges for all the different formats of each manual to be built with
the same -I options as previously discussed.  OK to commit?

gdb:
2009-04-21  Joseph Myers  <joseph@codesourcery.com>

	* configure.ac (--with-datarootdir, --with-docdir, --with-pdfdir,
	--with-htmldir): New.
	* configure: Regenerate.

gdb/doc:
2009-04-21  Joseph Myers  <joseph@codesourcery.com>

	* configure.ac (--with-datarootdir, --with-docdir, --with-pdfdir,
	--with-htmldir): New.
	* configure: Regenerate.
	* Makefile.in (datarootdir, docdir): Define.
	(gdb.dvi, gdb.pdf): Use same -I options as for building gdb.info
	instead of $(SET_TEXINPUTS).
	(gdbint.dvi, gdbint.pdf): Use same -I options as for building
	gdbint.info instead of $(SET_TEXINPUTS).
	(gdbint/index.html): Use same -I options as for building
	gdbint.info.
	(stabs.dvi, stabs.pdf): Use same -I options as for building
	stabs.info instead of $(SET_TEXINPUTS).
	(stabs/index.html): Use same -I options as for building
	stabs.info.
	(annotate.dvi, annotate.pdf): Use same -I options as for building
	annotate.info instead of $(SET_TEXINPUTS).
	(annotate/index.html): Use same -I options as for building
	annotate.info.

Index: configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/configure.ac,v
retrieving revision 1.94
diff -u -r1.94 configure.ac
--- configure.ac	21 Apr 2009 10:13:05 -0000	1.94
+++ configure.ac	21 Apr 2009 12:38:46 -0000
@@ -1962,7 +1962,27 @@
 AC_DEFINE(GDB_DEFAULT_HOST_CHARSET, "UTF-8",
           [Define to be a string naming the default host character set.])
 
-dnl Required by html, pdf, install-pdf and install-html
+# Flags needed to enable html installing and building
+AC_ARG_WITH(datarootdir,
+AC_HELP_STRING([--with-datarootdir], [use datarootdir as the data root directory.]),
+[datarootdir="\${prefix}/${withval}"],
+[datarootdir="\${prefix}/share"])
+
+AC_ARG_WITH(docdir,
+AC_HELP_STRING([--with-docdir], [install documentation in this directory.]),
+[docdir="\${prefix}/${withval}"],
+[docdir="\${datarootdir}/doc"])
+
+AC_ARG_WITH(pdfdir,
+AC_HELP_STRING([--with-pdfdir], [install pdf in this directory.]),
+[pdfdir="\${prefix}/${withval}"],
+[pdfdir="\${docdir}"])
+
+AC_ARG_WITH(htmldir,
+AC_HELP_STRING([--with-htmldir], [install html in this directory.]),
+[htmldir="\${prefix}/${withval}"],
+[htmldir="\${docdir}"])
+
 AC_SUBST(datarootdir)
 AC_SUBST(docdir)
 AC_SUBST(htmldir)
Index: doc/Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/doc/Makefile.in,v
retrieving revision 1.45
diff -u -r1.45 Makefile.in
--- doc/Makefile.in	18 Apr 2009 17:11:02 -0000	1.45
+++ doc/Makefile.in	21 Apr 2009 12:38:46 -0000
@@ -24,6 +24,8 @@
 prefix = @prefix@
 
 infodir = @infodir@
+datarootdir = @datarootdir@
+docdir = @docdir@
 pdfdir = @pdfdir@
 htmldir = @htmldir@
 
@@ -338,7 +340,8 @@
 		ln $(srcdir)/GDBvn.texi . || \
 		cp $(srcdir)/GDBvn.texi . ; else true; fi
 	rm -f $(GDB_TEX_TMPS)
-	$(SET_TEXINPUTS) $(TEXI2DVI) $(srcdir)/gdb.texinfo
+	$(TEXI2DVI) -I ${READLINE_DIR} -I ${GDBMI_DIR} -I $(srcdir) \
+		$(srcdir)/gdb.texinfo
 
 gdb.ps: gdb.dvi
 	$(DVIPS) -o $@ $?
@@ -349,7 +352,8 @@
 		ln $(srcdir)/GDBvn.texi . || \
 		cp $(srcdir)/GDBvn.texi . ; else true; fi
 	rm -f $(GDB_TEX_TMPS)
-	$(SET_TEXINPUTS) $(TEXI2DVI) --pdf $(srcdir)/gdb.texinfo
+	$(TEXI2DVI) --pdf -I ${READLINE_DIR} -I ${GDBMI_DIR} -I $(srcdir) \
+		$(srcdir)/gdb.texinfo
 
 # GDB MANUAL: info file
 gdb.info: ${GDB_DOC_FILES}
@@ -440,14 +444,14 @@
 # GDB INTERNALS MANUAL: TeX dvi file
 gdbint.dvi: $(GDBINT_DOC_FILES)
 	rm -f $(GDBINT_TEX_TMPS)
-	$(SET_TEXINPUTS) $(TEXI2DVI) $(srcdir)/gdbint.texinfo
+	$(TEXI2DVI) -I $(srcdir) $(srcdir)/gdbint.texinfo
 
 gdbint.ps : gdbint.dvi
 	$(DVIPS) -o $@ $?
 
 gdbint.pdf: $(GDBINT_DOC_FILES)
 	rm -f $(GDBINT_TEX_TMPS)
-	$(SET_TEXINPUTS) $(TEXI2DVI) --pdf $(srcdir)/gdbint.texinfo
+	$(TEXI2DVI) --pdf -I $(srcdir) $(srcdir)/gdbint.texinfo
 
 # GDB INTERNALS MANUAL: info file
 
@@ -457,7 +461,7 @@
 # GDB INTERNALS MANUAL: HTML file
 
 gdbint/index.html: $(GDBINT_DOC_FILES)
-	$(MAKEHTML) $(MAKEHTMLFLAGS) $(srcdir)/gdbint.texinfo
+	$(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/gdbint.texinfo
 
 stabs.info: $(STABS_DOC_FILES)
 	$(MAKEINFO) -I $(srcdir) -o stabs.info $(srcdir)/stabs.texinfo
@@ -465,7 +469,7 @@
 # STABS DOCUMENTATION: HTML file
 
 stabs/index.html: $(STABS_DOC_FILES)
-	$(MAKEHTML) $(MAKEHTMLFLAGS) $(srcdir)/stabs.texinfo
+	$(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/stabs.texinfo
 
 # Clean these up before each run.  Avoids a catch 22 with not being
 # able to re-generate these files (to fix a corruption) because these
@@ -476,14 +480,14 @@
 # STABS DOCUMENTATION: TeX dvi file
 stabs.dvi : $(STABS_DOC_FILES)
 	rm -f $(STABS_TEX_TMPS)
-	$(SET_TEXINPUTS) $(TEXI2DVI) $(srcdir)/stabs.texinfo
+	$(TEXI2DVI) -I $(srcdir) $(srcdir)/stabs.texinfo
 
 stabs.ps: stabs.dvi
 	$(DVIPS) -o $@ $?
 
 stabs.pdf: $(STABS_DOC_FILES)
 	rm -f $(STABS_TEX_TMPS)
-	$(SET_TEXINPUTS) $(TEXI2DVI) --pdf $(srcdir)/stabs.texinfo
+	$(TEXI2DVI) --pdf -I $(srcdir) $(srcdir)/stabs.texinfo
 
 # Clean these up before each run.  Avoids a catch 22 with not being
 # able to re-generate these files (to fix a corruption) because these
@@ -494,20 +498,20 @@
 # ANNOTATE DOCUMENTATION: TeX dvi file
 annotate.dvi : $(ANNOTATE_DOC_FILES)
 	rm -f $(ANNOTATE_TEX_TMPS)
-	$(SET_TEXINPUTS) $(TEXI2DVI) $(srcdir)/annotate.texinfo
+	$(TEXI2DVI) -I $(srcdir) $(srcdir)/annotate.texinfo
 
 annotate.ps: annotate.dvi
 	$(DVIPS) -o $@ $?
 
 annotate.pdf: $(ANNOTATE_DOC_FILES)
 	rm -f $(ANNOTATE_TEX_TMPS)
-	$(SET_TEXINPUTS) $(TEXI2DVI) --pdf $(srcdir)/annotate.texinfo
+	$(TEXI2DVI) --pdf -I $(srcdir) $(srcdir)/annotate.texinfo
 
 annotate.info: $(ANNOTATE_DOC_FILES)
 	$(MAKEINFO)  -I $(srcdir) -o annotate.info $(srcdir)/annotate.texinfo
 
 annotate/index.html: $(ANNOTATE_DOC_FILES)
-	$(MAKEHTML) $(MAKEHTMLFLAGS) $(srcdir)/annotate.texinfo
+	$(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/annotate.texinfo
 
 force:
 
Index: doc/configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/doc/configure.ac,v
retrieving revision 1.3
diff -u -r1.3 configure.ac
--- doc/configure.ac	17 Apr 2009 17:44:05 -0000	1.3
+++ doc/configure.ac	21 Apr 2009 12:38:47 -0000
@@ -3,11 +3,33 @@
 sinclude(../../config/acx.m4)
 AC_PROG_INSTALL
 AC_PROG_LN_S
-dnl Required by html, pdf, install-pdf and install-html
+
+# Flags needed to enable html installing and building
+AC_ARG_WITH(datarootdir,
+AC_HELP_STRING([--with-datarootdir], [use datarootdir as the data root directory.]),
+[datarootdir="\${prefix}/${withval}"],
+[datarootdir="\${prefix}/share"])
+
+AC_ARG_WITH(docdir,
+AC_HELP_STRING([--with-docdir], [install documentation in this directory.]),
+[docdir="\${prefix}/${withval}"],
+[docdir="\${datarootdir}/doc"])
+
+AC_ARG_WITH(pdfdir,
+AC_HELP_STRING([--with-pdfdir], [install pdf in this directory.]),
+[pdfdir="\${prefix}/${withval}"],
+[pdfdir="\${docdir}"])
+
+AC_ARG_WITH(htmldir,
+AC_HELP_STRING([--with-htmldir], [install html in this directory.]),
+[htmldir="\${prefix}/${withval}"],
+[htmldir="\${docdir}"])
+
 AC_SUBST(datarootdir)
 AC_SUBST(docdir)
 AC_SUBST(htmldir)
 AC_SUBST(pdfdir)
+
 ACX_PKGVERSION([GDB])
 ACX_BUGURL([http://www.gnu.org/software/gdb/bugs/])
 AC_OUTPUT(Makefile)

-- 
Joseph S. Myers
joseph@codesourcery.com


  reply	other threads:[~2009-04-21 12:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-17 11:47 Joseph S. Myers
2009-04-17 15:26 ` Eli Zaretskii
2009-04-17 15:30   ` Joseph S. Myers
2009-04-17 18:18     ` Eli Zaretskii
2009-04-17 19:43       ` Tom Tromey
2009-04-17 19:49       ` Joseph S. Myers
2009-04-18  7:31         ` Eli Zaretskii
2009-04-18  9:32           ` Joseph S. Myers
2009-04-20 19:51             ` Carlos O'Donell
2009-04-20 20:56               ` Eli Zaretskii
2009-04-21 12:45                 ` Joseph S. Myers [this message]
2009-04-21 18:54                   ` Eli Zaretskii
2009-04-17 15:58   ` Joseph S. Myers
2009-04-17 16:58 ` Tom Tromey
2009-04-17 17:31   ` Daniel Jacobowitz
2009-04-17 18:47     ` Tom Tromey
2009-04-17 19:16       ` Eli Zaretskii

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=Pine.LNX.4.64.0904211244270.16159@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=carlos@codesourcery.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    /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