From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30584 invoked by alias); 18 Apr 2009 07:31:32 -0000 Received: (qmail 30570 invoked by uid 22791); 18 Apr 2009 07:31:28 -0000 X-SWARE-Spam-Status: No, hits=1.1 required=5.0 tests=AWL,BAYES_00,HK_OBFDOM,J_CHICKENPOX_92,RCVD_IN_JMF_BL,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout3.012.net.il (HELO mtaout3.012.net.il) (84.95.2.7) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 18 Apr 2009 07:31:22 +0000 Received: from conversion-daemon.i_mtaout3.012.net.il by i_mtaout3.012.net.il (HyperSendmail v2004.12) id <0KIA00J00CUFAX00@i_mtaout3.012.net.il> for gdb-patches@sourceware.org; Sat, 18 Apr 2009 10:31:19 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.124.144.191]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KIA00DCPCW66870@i_mtaout3.012.net.il>; Sat, 18 Apr 2009 10:31:19 +0300 (IDT) Date: Sat, 18 Apr 2009 07:31:00 -0000 From: Eli Zaretskii Subject: Re: install-html and install-pdf improvements In-reply-to: To: "Joseph S. Myers" Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83skk6ifjr.fsf@gnu.org> References: <83hc0njo9e.fsf@gnu.org> <83bpqvjg96.fsf@gnu.org> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-04/txt/msg00478.txt.bz2 > Date: Fri, 17 Apr 2009 19:48:57 +0000 (UTC) > From: "Joseph S. Myers" > cc: gdb-patches@sourceware.org > > > > On Fri, 17 Apr 2009, Eli Zaretskii wrote: > > > > > > > Yes, but I don't understand why did you need to define docdir in > > > > addition to pdfdir and htmldir. Unlike the other two, docdir is not > > > > used anywhere, so why define it? > > > > > > The default definitions of htmldir and pdfdir use ${docdir} > > > > Sorry, I'm not following: what default definitions? These variables > > are used neither in your patch nor in the current doc/Makefile.in. > > What am I missing? > > The default definitions in the toplevel configure.ac, at least. > > docdir="\${datarootdir}/doc" > pdfdir="\${docdir}" > htmldir="\${docdir}" That's okay, but I wasnt asking about the top level. What I was asking about are these specific parts of the patch, which relate to subdirectories, not to the top-level configure and Makefile.in: Index: gdb/Makefile.in =================================================================== RCS file: /cvs/src/src/gdb/Makefile.in,v retrieving revision 1.1076 diff -u -r1.1076 Makefile.in --- gdb/Makefile.in 30 Mar 2009 19:54:19 -0000 1.1076 +++ gdb/Makefile.in 17 Apr 2009 11:28:54 -0000 @@ -40,8 +40,10 @@ man8dir = $(mandir)/man8 man9dir = $(mandir)/man9 infodir = @infodir@ -pdfdir = $(prefix)/share/doc/gdb -htmldir = $(prefix)/html +datarootdir = @datarootdir@ +docdir = @docdir@ +htmldir = @htmldir@ +pdfdir = @pdfdir@ includedir = @includedir@ # This can be referenced by `LIBINTL' as computed by @@ -530,6 +532,9 @@ "prefix=$(prefix)" \ "exec_prefix=$(exec_prefix)" \ "infodir=$(infodir)" \ + "datarootdir=$(datarootdir)" \ + "docdir=$(docdir)" \ + "htmldir=$(htmldir)" \ "pdfdir=$(pdfdir)" \ "libdir=$(libdir)" \ "mandir=$(mandir)" \ Index: gdb/configure.ac =================================================================== RCS file: /cvs/src/src/gdb/configure.ac,v retrieving revision 1.92 diff -u -r1.92 configure.ac --- gdb/configure.ac 15 Apr 2009 22:20:31 -0000 1.92 +++ gdb/configure.ac 17 Apr 2009 11:28:55 -0000 @@ -1955,6 +1955,12 @@ 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 +AC_SUBST(datarootdir) +AC_SUBST(docdir) +AC_SUBST(htmldir) +AC_SUBST(pdfdir) + AC_OUTPUT(Makefile .gdbinit:gdbinit.in gnulib/Makefile, [ dnl Autoconf doesn't provide a mechanism for modifying definitions Index: gdb/doc/configure.ac =================================================================== RCS file: /cvs/src/src/gdb/doc/configure.ac,v retrieving revision 1.2 diff -u -r1.2 configure.ac --- gdb/doc/configure.ac 5 Jun 2008 22:36:56 -0000 1.2 +++ gdb/doc/configure.ac 17 Apr 2009 11:28:55 -0000 @@ -3,6 +3,11 @@ sinclude(../../config/acx.m4) AC_PROG_INSTALL AC_PROG_LN_S +dnl Required by html, pdf, install-pdf and install-html +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) AFAICS, neither gdb/Makefile.in, nor anyone of the Makefile.in files in its subdirectory, including gdb/doc/, uses $(docdir). So I'm wondering why do we need a variable no one uses, and why do we pass it to sub-Make? IOW, why not just have $(htmldir) and $(pdfdir) in the Makefile's, and let the top-level configure figure out where they should be, based on "--with-*dir" switches? The sub-Make's would then get these values from the variables we pass to them, and there's no need to compute $(docdir) again in subdirectories. Note that, even according to your patch, gdb/doc/Makefile.in does not define nor use $(docdir), only the other two. I'm asking why can't we do the same in gdb/ as well?