From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4351 invoked by alias); 16 Nov 2008 01:38:11 -0000 Received: (qmail 4098 invoked by uid 22791); 16 Nov 2008 01:38:06 -0000 X-Spam-Check-By: sourceware.org Received: from eta-ori.net (HELO orion.eta-ori.net) (91.121.142.51) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 16 Nov 2008 01:36:48 +0000 Received: by orion.eta-ori.net (Postfix, from userid 1006) id 39FD723EE89; Sun, 16 Nov 2008 02:36:45 +0100 (CET) Received: from [IPv6:2001:6f8:10ae:0:217:31ff:fe81:8c8] (unknown [IPv6:2001:6f8:10ae:0:217:31ff:fe81:8c8]) by orion.eta-ori.net (Postfix) with ESMTPSA id 05C0E23EE7D for ; Sun, 16 Nov 2008 02:36:43 +0100 (CET) Message-ID: <491F6FAB.6020305@impulze.org> Date: Sun, 16 Nov 2008 18:08:00 -0000 From: Daniel Mierswa User-Agent: Thunderbird 2.0.0.17 (X11/20081026) MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: autotools patches for --*dir and upcoming versions Content-Type: multipart/mixed; boundary="------------090100020408070306030400" 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: 2008-11/txt/msg00407.txt.bz2 This is a multi-part message in MIME format. --------------090100020408070306030400 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 3426 Hi there I created a patch to let the --{dataroot,doc,pdf,html}dir to be passed through configure instead of using the self written --with-*dir. The patch also fixes some warnings spilled out by newer autotools regarding ordering of AC_ macros and unquoted definitions. The patch was created against the official 6.8 tarball. Tested by invoking the usual, autoreconf procedures, followed by ./configure with --docdir=/something and invoking make install-html at the very end. I'd like to hear your opinion. The ChangeLog entries would be as follows: ChangeLog: (couldn't find any) 2008-11-15 Daniel Mierswa * configure.ac: use config directory for m4-macro searches, provide AC_PROG_LIBTOOL, so ltmain.sh and others get updated by autoreconf, remove self-written --with-{dataroot,doc,pdf,html}dir switches and let the ones created by autoconf pass through, remove unneeded AC_SUBST bfd/ChangeLog: 2008-11-15 Daniel Mierswa * configure.in: AC_GNU_SOURCE must occur before AC_PROG_CC, use own directory for m4-macro searches, remove unneeded AC_SUBST gdb/ChangeLog: 2008-11-15 Daniel Mierswa * configure.ac: AC_{GNU_SOURCE,AIX} are both present in AC_USE_SYSTEM_EXTENSIONS (must occur before AC_PROG_CC) * acinclude.m4: serial has to appear before any macro definition * Makefile.in: touch datarootdir so autoconf is happy, don't redefine variables passed by configure gdb/doc/ChangeLog: 2008-11-15 Daniel Mierswa * Makefile.in: don't redefine variables passed by configure, install html files from subdirectories gdb/gdbserver/ChangeLog: 2008-11-15 Daniel Mierswa * Makefile.in: don't redefine variables passed by configure intl/ChangeLog: 2008-11-15 Daniel Mierswa * Makefile.in: touch datarootdir so autoconf is happy libiberty/ChangeLog: 2008-11-15 Daniel Mierswa * configure.ac: remove unneeded AC_SUBST sim/common/ChangeLog: 2008-11-15 Daniel Mierswa * aclocal.m4: use quoted definitions, autoconf cached variables have to include cv in their name sim/ChangeLog: 2008-11-15 Daniel Mierswa * configure.ac: use own directory for m4-macro searches * Makefile.in: touch datarootdir so autoconf is happy libdecnumber/ChangeLog: 2008-11-15 Daniel Mierswa * Makefile.in: touch datarootdir so autoconf is happy readline/ChangeLog.gdb: 2008-11-15 Daniel Mierswa * Makefile.in: touch datarootdir so autoconf is happy, create empty install-html target so make install-html from top-level won't fail readline/doc/ChangeLog.gdb: 2008-11-15 Daniel Mierswa * Makefile.in: touch datarootdir so autoconf is happy readline/examples/rlfe/ChangeLog: 2008-11-15 Daniel Mierswa * configure.in: use quoted definitions readline/shlib/ChangeLog.gdb: (couldn't find any) 2008-11-15 Daniel Mierswa * Makefile.in: touch datarootdir so autoconf is happy Forgot to attach the patch in my first mail :-( Sorry. -- Mierswa, Daniel If you still don't like it, that's ok: that's why I'm boss. I simply know better than you do. --- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22 --------------090100020408070306030400 Content-Type: text/plain; name="gdb-6.8-sane_autotools.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="gdb-6.8-sane_autotools.patch" Content-length: 17381 diff -Naur gdb-6.8.orig/bfd/configure.in gdb-6.8/bfd/configure.in --- gdb-6.8.orig/bfd/configure.in 2008-02-14 16:20:26.000000000 +0100 +++ gdb-6.8/bfd/configure.in 2008-11-15 22:38:23.000000000 +0100 @@ -5,6 +5,8 @@ AC_INIT AC_CONFIG_SRCDIR([libbfd.c]) +AC_CONFIG_MACRO_DIR(.) + AC_CANONICAL_TARGET AC_ISC_POSIX @@ -19,8 +21,8 @@ dnl configure option --enable-shared. AM_DISABLE_SHARED -AC_PROG_CC AC_GNU_SOURCE +AC_PROG_CC AC_PROG_LIBTOOL @@ -1053,10 +1055,4 @@ -e "s,@GMOFILES@,$GMOFILES," \ po/Makefile.in > po/Makefile]],[[]]) -dnl Required by html and install-html -AC_SUBST(datarootdir) -AC_SUBST(docdir) -AC_SUBST(htmldir) - AC_OUTPUT - diff -Naur gdb-6.8.orig/configure.ac gdb-6.8/configure.ac --- gdb-6.8.orig/configure.ac 2008-03-27 19:27:19.000000000 +0100 +++ gdb-6.8/configure.ac 2008-11-15 22:38:23.000000000 +0100 @@ -23,6 +23,8 @@ AC_INIT(move-if-change) AC_PREREQ(2.59) +AC_CONFIG_MACRO_DIR([config]) + # Find the build, host, and target systems. ACX_NONCANONICAL_BUILD ACX_NONCANONICAL_HOST @@ -47,6 +49,7 @@ AC_PROG_INSTALL ACX_PROG_LN AC_PROG_LN_S +AC_PROG_LIBTOOL ### we might need to use some other shell than /bin/sh for running subshells ### If we are on Windows, search for the shell. This will permit people @@ -2751,30 +2754,4 @@ esac AC_SUBST(stage2_werror_flag) -# Flags needed to enable html installing and building -AC_ARG_WITH(datarootdir, -[ --with-datarootdir use datarootdir as the data root directory.], -[datarootdir="\${prefix}/${withval}"], -[datarootdir="\${prefix}/share"]) - -AC_ARG_WITH(docdir, -[ --with-docdir install documentation in this directory.], -[docdir="\${prefix}/${withval}"], -[docdir="\${datarootdir}/doc"]) - -AC_ARG_WITH(pdfdir, -[ --with-pdfdir install pdf in this directory.], -[pdfdir="\${prefix}/${withval}"], -[pdfdir="\${docdir}"]) - -AC_ARG_WITH(htmldir, -[ --with-htmldir install html in this directory.], -[htmldir="\${prefix}/${withval}"], -[htmldir="\${docdir}"]) - -AC_SUBST(datarootdir) -AC_SUBST(docdir) -AC_SUBST(pdfdir) -AC_SUBST(htmldir) - AC_OUTPUT(Makefile) diff -Naur gdb-6.8.orig/etc/configure.in gdb-6.8/etc/configure.in --- gdb-6.8.orig/etc/configure.in 2006-04-06 23:49:30.000000000 +0200 +++ gdb-6.8/etc/configure.in 2008-11-15 22:38:23.000000000 +0100 @@ -4,9 +4,4 @@ AC_PROG_INSTALL -AC_SUBST(datarootdir) -AC_SUBST(docdir) -AC_SUBST(htmldir) - - AC_OUTPUT(Makefile) diff -Naur gdb-6.8.orig/gdb/acinclude.m4 gdb-6.8/gdb/acinclude.m4 --- gdb-6.8.orig/gdb/acinclude.m4 2007-03-30 14:57:42.000000000 +0200 +++ gdb-6.8/gdb/acinclude.m4 2008-11-15 22:38:23.000000000 +0100 @@ -17,6 +17,7 @@ sinclude(../config/lib-prefix.m4) sinclude(../config/lib-link.m4) +# serial 1 # # Sometimes the native compiler is a bogus stub for gcc or /usr/ucb/cc. This # makes configure think it's cross compiling. If --target wasn't used, then @@ -731,8 +732,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, # Boston, MA 02110-1301, USA. -# serial 1 - # @defmac AC_PROG_CC_STDC # @maindex PROG_CC_STDC # @ovindex CC diff -Naur gdb-6.8.orig/gdb/configure.ac gdb-6.8/gdb/configure.ac --- gdb-6.8.orig/gdb/configure.ac 2008-01-13 13:23:05.000000000 +0100 +++ gdb-6.8/gdb/configure.ac 2008-11-15 22:38:23.000000000 +0100 @@ -25,10 +25,9 @@ AC_CONFIG_HEADER(config.h:config.in) AM_MAINTAINER_MODE -AC_PROG_CC -AC_GNU_SOURCE -AC_AIX +AC_USE_SYSTEM_EXTENSIONS AC_ISC_POSIX +AC_PROG_CC AM_PROG_CC_STDC AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..) diff -Naur gdb-6.8.orig/gdb/doc/Makefile.in gdb-6.8/gdb/doc/Makefile.in --- gdb-6.8.orig/gdb/doc/Makefile.in 2008-01-01 23:53:14.000000000 +0100 +++ gdb-6.8/gdb/doc/Makefile.in 2008-11-16 00:55:24.000000000 +0100 @@ -24,8 +24,9 @@ prefix = @prefix@ infodir = @infodir@ -pdfdir = $(prefix)/share/doc/gdb -htmldir = $(prefix)/html +datarootdir = @datarootdir@ +pdfdir = @pdfdir@ +htmldir = @htmldir@ SHELL = @SHELL@ @@ -202,8 +203,13 @@ done install-html: html - for i in *.html ; do \ - $(INSTALL_DATA) $$i $(DESTDIR)$(htmldir)/$$i ; \ + for dir in gdb gdbint annotate stabs ; do \ + $(mkinstalldirs) $(DESTDIR)$(htmldir)/$$dir ; \ + cd $$dir ; \ + for i in *.html ; do \ + $(INSTALL_DATA) $$i $(DESTDIR)$(htmldir)/$$dir/$$i ; \ + done ; \ + cd .. ; \ done pdf__strip_dir = `echo $$p | sed -e 's|^.*/||'`; @@ -515,7 +520,10 @@ # "clean" or "distclean". Use maintainer-clean to remove them. maintainer-clean realclean: distclean - rm -f GDBvn.texi *.info* *.dvi *.ps *.html *.pdf + for dir in gdb gdbint annotate stabs ; do \ + rm -f $$dir/*.html ; \ + done + rm -f GDBvn.texi *.info* *.dvi *.ps *.pdf install: install-info diff -Naur gdb-6.8.orig/gdb/gdbserver/Makefile.in gdb-6.8/gdb/gdbserver/Makefile.in --- gdb-6.8.orig/gdb/gdbserver/Makefile.in 2008-02-11 23:00:31.000000000 +0100 +++ gdb-6.8/gdb/gdbserver/Makefile.in 2008-11-15 22:38:23.000000000 +0100 @@ -28,6 +28,7 @@ libdir = @libdir@ tooldir = $(libdir)/$(target_alias) +datarootdir = @datarootdir@ datadir = @datadir@ mandir = @mandir@ man1dir = $(mandir)/man1 @@ -40,7 +41,7 @@ man8dir = $(mandir)/man8 man9dir = $(mandir)/man9 infodir = @infodir@ -htmldir = $(prefix)/html +htmldir = @htmldir@ includedir = @includedir@ SHELL = /bin/sh diff -Naur gdb-6.8.orig/gdb/Makefile.in gdb-6.8/gdb/Makefile.in --- gdb-6.8.orig/gdb/Makefile.in 2008-03-17 13:15:08.000000000 +0100 +++ gdb-6.8/gdb/Makefile.in 2008-11-15 22:38:23.000000000 +0100 @@ -28,7 +28,7 @@ bindir = @bindir@ libdir = @libdir@ tooldir = $(libdir)/$(target_alias) - +datarootdir = @datarootdir@ datadir = @datadir@ localedir = @localedir@ mandir = @mandir@ @@ -42,8 +42,8 @@ man8dir = $(mandir)/man8 man9dir = $(mandir)/man9 infodir = @infodir@ -pdfdir = $(prefix)/share/doc/gdb -htmldir = $(prefix)/html +pdfdir = @pdfdir@ +htmldir = @htmldir@ includedir = @includedir@ # This can be referenced by `LIBINTL' as computed by diff -Naur gdb-6.8.orig/intl/configure.ac gdb-6.8/intl/configure.ac --- gdb-6.8.orig/intl/configure.ac 2006-05-22 17:30:13.000000000 +0200 +++ gdb-6.8/intl/configure.ac 2008-11-15 22:38:23.000000000 +0100 @@ -3,6 +3,7 @@ AC_CONFIG_SRCDIR(gettext.c) AC_CONFIG_HEADER(config.h) AC_CONFIG_MACRO_DIR(../config) +AC_USE_SYSTEM_EXTENSIONS AM_GNU_GETTEXT_VERSION(0.12.1) AM_GNU_GETTEXT diff -Naur gdb-6.8.orig/intl/Makefile.in gdb-6.8/intl/Makefile.in --- gdb-6.8.orig/intl/Makefile.in 2006-09-27 17:03:38.000000000 +0200 +++ gdb-6.8/intl/Makefile.in 2008-11-15 22:38:23.000000000 +0100 @@ -31,6 +31,7 @@ transform = @program_transform_name@ libdir = @libdir@ includedir = @includedir@ +datarootdir = @datarootdir@ datadir = @datadir@ localedir = $(datadir)/locale aliaspath = $(localedir) diff -Naur gdb-6.8.orig/libdecnumber/Makefile.in gdb-6.8/libdecnumber/Makefile.in --- gdb-6.8.orig/libdecnumber/Makefile.in 2008-01-25 20:05:42.000000000 +0100 +++ gdb-6.8/libdecnumber/Makefile.in 2008-11-15 23:08:40.000000000 +0100 @@ -44,6 +44,7 @@ RANLIB = @RANLIB@ SHELL = @SHELL@ +datarootdir = @datarootdir@ datadir = @datadir@ exec_prefix = @prefix@ libdir = @libdir@ diff -Naur gdb-6.8.orig/libiberty/configure.ac gdb-6.8/libiberty/configure.ac --- gdb-6.8.orig/libiberty/configure.ac 2007-07-17 20:05:02.000000000 +0200 +++ gdb-6.8/libiberty/configure.ac 2008-11-15 22:38:23.000000000 +0100 @@ -707,11 +707,6 @@ done LIBOBJS="$L" -dnl Required by html and install-html -AC_SUBST(datarootdir) -AC_SUBST(docdir) -AC_SUBST(htmldir) - # We need multilib support, but only if configuring for the target. AC_CONFIG_FILES([Makefile testsuite/Makefile]) AC_CONFIG_COMMANDS([default], diff -Naur gdb-6.8.orig/readline/doc/Makefile.in gdb-6.8/readline/doc/Makefile.in --- gdb-6.8.orig/readline/doc/Makefile.in 2006-05-05 20:26:12.000000000 +0200 +++ gdb-6.8/readline/doc/Makefile.in 2008-11-15 23:10:07.000000000 +0100 @@ -23,6 +23,7 @@ prefix = @prefix@ infodir = @infodir@ +datarootdir = @datarootdir@ mandir = @mandir@ manpfx = man diff -Naur gdb-6.8.orig/readline/examples/rlfe/configure.in gdb-6.8/readline/examples/rlfe/configure.in --- gdb-6.8.orig/readline/examples/rlfe/configure.in 2006-04-20 22:05:51.000000000 +0200 +++ gdb-6.8/readline/examples/rlfe/configure.in 2008-11-15 22:38:37.000000000 +0100 @@ -8,7 +8,7 @@ dnl dnl Define some useful macros dnl -AC_DEFUN(AC_PROGRAM_SOURCE, +AC_DEFUN([AC_PROGRAM_SOURCE], [AC_REQUIRE([AC_PROG_CPP])AC_PROVIDE([$0])cat > conftest.c <