From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23532 invoked by alias); 4 Jul 2014 03:24:35 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 23471 invoked by uid 89); 4 Jul 2014 03:24:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f47.google.com Received: from mail-pa0-f47.google.com (HELO mail-pa0-f47.google.com) (209.85.220.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 04 Jul 2014 03:24:15 +0000 Received: by mail-pa0-f47.google.com with SMTP id kq14so1249780pab.20 for ; Thu, 03 Jul 2014 20:24:13 -0700 (PDT) X-Received: by 10.68.225.74 with SMTP id ri10mr8563936pbc.116.1404444253608; Thu, 03 Jul 2014 20:24:13 -0700 (PDT) Received: from bubble.grove.modra.org (CPE-58-160-155-134.oycza5.sa.bigpond.net.au. [58.160.155.134]) by mx.google.com with ESMTPSA id y2sm6836480pdl.38.2014.07.03.20.24.11 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Jul 2014 20:24:12 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id D824FEA3914; Fri, 4 Jul 2014 12:54:07 +0930 (CST) Date: Fri, 04 Jul 2014 03:24:00 -0000 From: Alan Modra To: binutils@sourceware.org Subject: Use modern AC_INIT in configure.in Message-ID: <20140704032407.GN4471@bubble.grove.modra.org> Mail-Followup-To: binutils@sourceware.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2014-07/txt/msg00054.txt.bz2 This removes usage of the obsolete AC_INIT and AM_INIT_AUTOMAKE in all binutils configure.in files. The BFD version is now in bfd/version.m4 rather than bfd/configure.in, which allows automake to automatically track this dependency. Tristan, I made what I think are the necessary changes to gas/configure.com but can't test it, so please check that I didn't break anything there. bfd/ * version.m4: New file. * configure.in: Include version.m4. (AC_INIT): Update. * Makefile.am (RELEASE): Delete. (bfdver.h): Depend on development.sh, use instead of RELEASE. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. opcodes/ * configure.in: Include bfd/version.m4. (AC_INIT, AM_INIT_AUTOMAKE): Use modern form. (BFD_VERSION): Delete. * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Remove bfd/configure.in. * configure: Regenerate. * Makefile.in: Regenerate. binutils/ * configure.in: Include bfd/version.m4. (AC_INIT, AM_INIT_AUTOMAKE): Use modern form. (BFD_VERSION): Delete. * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Remove bfd/configure.in. * configure: Regenerate. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. gas/ * configure.in: Include bfd/version.m4. (AC_INIT, AM_INIT_AUTOMAKE): Use modern form. (BFD_VERSION): Delete. * configure.com: Get bfd version from bfd/version.m4. * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Remove bfd/configure.in. * configure: Regenerate. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. gprof/ * configure.in: Include bfd/version.m4. (AC_INIT, AM_INIT_AUTOMAKE): Use modern form. (BFD_VERSION): Delete. * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Remove bfd/configure.in. * configure: Regenerate. * Makefile.in: Regenerate. ld/ * configure.in: Include bfd/version.m4. (AC_INIT, AM_INIT_AUTOMAKE): Use modern form. (BFD_VERSION): Delete. * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Remove bfd/configure.in. * configure: Regenerate. * Makefile.in: Regenerate. diff --git a/bfd/Makefile.am b/bfd/Makefile.am index 595c489..72ee0bf 100644 --- a/bfd/Makefile.am +++ b/bfd/Makefile.am @@ -20,9 +20,6 @@ AUTOMAKE_OPTIONS = 1.11 no-dist foreign ACLOCAL_AMFLAGS = -I . -I .. -I ../config -# Uncomment the following line when doing a release. -# RELEASE=y - INCDIR = $(srcdir)/../include CSEARCH = -I. -I$(srcdir) -I$(INCDIR) @@ -1027,14 +1024,15 @@ CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \ DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES) libtool-soversion -bfdver.h: $(srcdir)/version.h $(srcdir)/Makefile.in +bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in @echo "creating $@" @bfd_version=`echo "$(VERSION)" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\ bfd_version_string="\"$(VERSION)\"" ;\ bfd_soversion="$(VERSION)" ;\ bfd_version_package="\"$(PKGVERSION)\"" ;\ report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\ - if test "x$(RELEASE)" = x ; then \ + . $(srcdir)/development.sh ;\ + if test "$$development" = true ; then \ bfd_version_date=`sed -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\ bfd_version_string="\"$(VERSION).$${bfd_version_date}\"" ;\ bfd_soversion="$(VERSION).$${bfd_version_date}" ;\ diff --git a/bfd/configure.in b/bfd/configure.in index 2cc4499..017304f 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -18,7 +18,8 @@ dnl . dnl AC_PREREQ(2.59) -AC_INIT([bfd], [2.24.51]) +m4_include([version.m4]) +AC_INIT([bfd], BFD_VERSION) AC_CONFIG_SRCDIR([libbfd.c]) AC_CANONICAL_TARGET diff --git a/bfd/version.m4 b/bfd/version.m4 new file mode 100644 index 0000000..e032e68 --- /dev/null +++ b/bfd/version.m4 @@ -0,0 +1 @@ +m4_define([BFD_VERSION], [2.24.51]) diff --git a/binutils/Makefile.am b/binutils/Makefile.am index aca2610..7f5f0c4 100644 --- a/binutils/Makefile.am +++ b/binutils/Makefile.am @@ -512,10 +512,8 @@ EXTRA_DIST = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \ diststuff: $(EXTRA_DIST) info all: info -# We extract version from bfd/configure.in, make sure to rerun configure -# when BFD's version changes. -CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in \ - $(BFDDIR)/development.sh +# development.sh is used to determine -Werror default. +CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh DISTCLEANFILES = sysroff.c sysroff.h site.exp site.bak embedspu diff --git a/binutils/configure.in b/binutils/configure.in index f3e6130..ff0d4dc 100644 --- a/binutils/configure.in +++ b/binutils/configure.in @@ -18,16 +18,14 @@ dnl . dnl AC_PREREQ(2.59) -AC_INIT +m4_include([../bfd/version.m4]) +AC_INIT([binutils], BFD_VERSION) AC_CONFIG_SRCDIR(ar.c) AC_CANONICAL_TARGET AC_ISC_POSIX -changequote(,)dnl -BFD_VERSION=`${srcdir}/../bfd/configure --version | sed -n -e '1s,.* ,,p'` -changequote([,])dnl -AM_INIT_AUTOMAKE(binutils, ${BFD_VERSION}) +AM_INIT_AUTOMAKE AC_PROG_CC AC_GNU_SOURCE diff --git a/gas/Makefile.am b/gas/Makefile.am index 669ab19..5727c75 100644 --- a/gas/Makefile.am +++ b/gas/Makefile.am @@ -693,6 +693,6 @@ de-stage3: - (cd stage3 ; rm -f as$(EXEEXT) ; mv -f * ..) - rmdir stage3 -CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in \ - $(srcdir)/configure.tgt \ - $(BFDDIR)/development.sh +# Reconfigure if configure.tgt changes. +# development.sh is used to determine -Werror default. +CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.tgt $(BFDDIR)/development.sh diff --git a/gas/configure.com b/gas/configure.com index 982d331..ceb50c2 100644 --- a/gas/configure.com +++ b/gas/configure.com @@ -185,17 +185,17 @@ $ create config-vms.in /* Version number of package */ $! -$! Get VERSION from ../bfd/configure.in +$! Get VERSION from ../bfd/version.m4 $! $ edit/tpu/nojournal/nosection/nodisplay/command=sys$input $DECK set (success, off); - mfile := CREATE_BUFFER("mfile", "[-.bfd]configure.in"); - match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, mfile); + mfile := CREATE_BUFFER("mfile", "[-.bfd]version.m4"); + match_pos := SEARCH_QUIETLY('m4_define([BFD_VERSION], [', FORWARD, EXACT, mfile); IF match_pos <> 0 THEN; POSITION(BEGINNING_OF(match_pos)); ERASE(match_pos); - vers := CURRENT_LINE-")"; + vers := CURRENT_LINE-"])"; ELSE; vers := "unknown"; ENDIF; diff --git a/gas/configure.in b/gas/configure.in index b9f9a98..cc4fc54 100644 --- a/gas/configure.in +++ b/gas/configure.in @@ -21,7 +21,8 @@ dnl . dnl dnl v2.5 needed for --bindir et al AC_PREREQ(2.59) -AC_INIT +m4_include([../bfd/version.m4]) +AC_INIT([gas], BFD_VERSION) AC_CONFIG_SRCDIR(as.h) dnl Autoconf 2.57 will find the aux dir without this. However, unless @@ -31,10 +32,7 @@ AC_CONFIG_AUX_DIR(..) AC_CANONICAL_TARGET AC_ISC_POSIX -changequote(,)dnl -BFD_VERSION=`${srcdir}/../bfd/configure --version | sed -n -e '1s,.* ,,p'` -changequote([,])dnl -AM_INIT_AUTOMAKE(gas, ${BFD_VERSION}) +AM_INIT_AUTOMAKE AC_PROG_CC AC_GNU_SOURCE diff --git a/gprof/Makefile.am b/gprof/Makefile.am index 2daefac..ef54c38 100644 --- a/gprof/Makefile.am +++ b/gprof/Makefile.am @@ -58,10 +58,8 @@ EXTRA_DIST = $(BUILT_SOURCES) bbconv.pl $(man_MANS) diststuff: $(BUILT_SOURCES) info $(man_MANS) -# We extract version from bfd/configure.in, make sure to rerun configure -# when BFD's version changes. -CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in \ - $(BFDDIR)/development.sh +# development.sh is used to determine -Werror default. +CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh # This empty rule is a hack against gmake patched by Apple. %.o:%.m diff --git a/gprof/configure.in b/gprof/configure.in index 20c2a57..583ad24 100644 --- a/gprof/configure.in +++ b/gprof/configure.in @@ -17,16 +17,14 @@ dnl along with this program; see the file COPYING3. If not see dnl . dnl AC_PREREQ(2.59) -AC_INIT +m4_include([../bfd/version.m4]) +AC_INIT([gprof], BFD_VERSION) AC_CONFIG_SRCDIR([gprof.c]) AC_CANONICAL_TARGET([]) AC_ISC_POSIX -changequote(,)dnl -BFD_VERSION=`${srcdir}/../bfd/configure --version | sed -n -e '1s,.* ,,p'` -changequote([,])dnl -AM_INIT_AUTOMAKE(gprof, ${BFD_VERSION}) +AM_INIT_AUTOMAKE dnl For simplicity, we use the BFD configuration file for most dnl things. However, we also need our own configuration file for diff --git a/ld/Makefile.am b/ld/Makefile.am index 2bb2cac..8e8ae20 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -2069,11 +2069,10 @@ ld.1: $(srcdir)/ld.texinfo configdoc.texi MAINTAINERCLEANFILES = configdoc.texi ld.1 -# We want to reconfigure if configure.host or configure.tgt changes. We -# extract version from bfd/configure.in, so we must depend on that also. +# We want to reconfigure if configure.host or configure.tgt changes. +# development.sh is used to determine -Werror default. CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt \ - $(srcdir)/../bfd/configure.in \ - $(srcdir)/../bfd/development.sh + $(BFDDIR)/development.sh MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \ ldemul-list.h crtbegin.@OBJEXT@ crtend.@OBJEXT@ ld.log ld.sum diff --git a/ld/configure.in b/ld/configure.in index 1ac69a3..d1bf1e4 100644 --- a/ld/configure.in +++ b/ld/configure.in @@ -18,17 +18,15 @@ dnl . dnl AC_PREREQ(2.59) -AC_INIT +m4_include([../bfd/version.m4]) +AC_INIT([ld], BFD_VERSION) AC_CONFIG_SRCDIR(ldmain.c) AC_CANONICAL_TARGET AC_CANONICAL_BUILD AC_ISC_POSIX -changequote(,)dnl -BFD_VERSION=`${srcdir}/../bfd/configure --version | sed -n -e '1s,.* ,,p'` -changequote([,])dnl -AM_INIT_AUTOMAKE(ld, ${BFD_VERSION}) +AM_INIT_AUTOMAKE AM_MAINTAINER_MODE AC_ARG_WITH(lib-path, [ --with-lib-path=dir1:dir2... set default LIB_PATH],LIB_PATH=$withval) diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am index 9ff6a38..4acc436 100644 --- a/opcodes/Makefile.am +++ b/opcodes/Makefile.am @@ -294,10 +294,8 @@ ALL_MACHINES = $(TARGET_LIBOPCODES_CFILES:.c=.lo) OFILES = @BFD_MACHINES@ -# We should reconfigure whenever bfd/configure.in changes, because -# that's where the version number in Makefile comes from. -CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in \ - $(BFDDIR)/development.sh +# development.sh is used to determine -Werror default. +CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ @INCINTL@ diff --git a/opcodes/configure.in b/opcodes/configure.in index 3ffcaa0..b93e855 100644 --- a/opcodes/configure.in +++ b/opcodes/configure.in @@ -18,20 +18,14 @@ dnl . dnl AC_PREREQ(2.59) -AC_INIT +m4_include([../bfd/version.m4]) +AC_INIT([opcodes], BFD_VERSION) AC_CONFIG_SRCDIR([z8k-dis.c]) AC_CANONICAL_TARGET AC_ISC_POSIX -# We currently only use the version number for the name of any shared -# library. For user convenience, we always use the same version -# number that BFD is using. -changequote(,)dnl -BFD_VERSION=`${srcdir}/../bfd/configure --version | sed -n -e '1s,.* ,,p'` -changequote([,])dnl - -AM_INIT_AUTOMAKE(opcodes, ${BFD_VERSION}) +AM_INIT_AUTOMAKE AC_PROG_CC AC_GNU_SOURCE -- Alan Modra Australia Development Lab, IBM