From e186355f246be84a48c1113dc528d689c1d4b717 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sat, 19 May 2012 11:47:26 +0200 Subject: [PATCH] init: obsolete usages of AM_INIT_AUTOMAKE not supported anymore This is a follow-up on commit v1.12-66-g27136df of 2012-05-06, "init: warn against obsolete usage of AM_INIT_AUTOMAKE". With this change, we drop support for the two-arguments and three-arguments invocation forms of the AM_INIT_AUTOMAKE macro, as in either of: AM_INIT_AUTOMAKE($PACKAGE, $VERSION) AM_INIT_AUTOMAKE($PACKAGE, $VERSION, NODEFINE) * NEWS, doc/automake.texi: Update. * m4/init.m4 (AM_INIT_AUTOMAKE): Report the two- and three-arguments invocation form as a hard error. * t/aminit-moreargs-deprecation.sh: Renamed ... * t/aminit-moreargs-deprecation.sh: ... to this, and updated to check the new semantics. * t/ac-output-old.tap: Adjust by avoiding old-style uses of AC_INIT and AM_INIT_AUTOMAKE. * t/acsilent.sh: Likewise. * t/dirlist.sh: Likewise. * t/dirlist2.sh: Likewise. * t/req.sh: Likewise. * t/nodef.sh: Remove as obsolete. * t/version.sh: Likewise. * t/version2.sh: Likewise. * t/backcompat.sh: Likewise. * t/backcompat2.sh: Likewise. * t/backcompat3.sh: Likewise. * t/backcompat5.sh: Likewise. * t/backcompat4.sh: Renamed ... * t/backcompat-acout.sh: ... to this. * t/list-of-tests.mk: Adjust. Signed-off-by: Stefano Lattarini --- NEWS | 7 + doc/automake.texi | 50 ++----- m4/init.m4 | 29 ++-- t/ac-output-old.tap | 25 ++-- t/acsilent.sh | 7 +- ...s-deprecation.sh => aminit-moreargs-no-more.sh} | 18 +-- t/{backcompat4.sh => backcompat-acout.sh} | 0 t/backcompat.sh | 64 --------- t/backcompat2.sh | 73 ---------- t/backcompat3.sh | 154 --------------------- t/backcompat5.sh | 125 ----------------- t/backcompat6.sh | 104 -------------- t/dirlist.sh | 4 +- t/dirlist2.sh | 9 +- t/list-of-tests.mk | 12 +- t/nodef.sh | 58 -------- t/req.sh | 9 +- t/version.sh | 41 ------ t/version2.sh | 41 ------ 19 files changed, 61 insertions(+), 769 deletions(-) rename t/{aminit-moreargs-deprecation.sh => aminit-moreargs-no-more.sh} (73%) rename t/{backcompat4.sh => backcompat-acout.sh} (100%) delete mode 100755 t/backcompat.sh delete mode 100755 t/backcompat2.sh delete mode 100755 t/backcompat3.sh delete mode 100755 t/backcompat5.sh delete mode 100755 t/backcompat6.sh delete mode 100755 t/nodef.sh delete mode 100755 t/version.sh delete mode 100755 t/version2.sh diff --git a/NEWS b/NEWS index 57af901..a673ee8 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,10 @@ +New in 1.13: + +* Obsolete features removed: + + - Use of the long-deprecated two- and three-arguments invocation forms + of the AM_INIT_AUTOMAKE is not supported anymore. + New in 1.12.1: * WARNING: Future backward-incompatibilities! diff --git a/doc/automake.texi b/doc/automake.texi index 2f2ebb0..032ac30 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -3939,19 +3939,19 @@ Automake ships with several Autoconf macros that you can use from your Runs many macros required for proper operation of the generated Makefiles. @vindex AUTOMAKE_OPTIONS -Today, @code{AM_INIT_AUTOMAKE} is called with a single argument: a -space-separated list of Automake options that should -be applied to every @file{Makefile.am} in the tree. The effect is as if -each option were listed in @code{AUTOMAKE_OPTIONS} (@pxref{Options}). +@code{AM_INIT_AUTOMAKE} is called with a single argument: a space-separated +list of Automake options that should be applied to every @file{Makefile.am} +in the tree. The effect is as if each option were listed in +@code{AUTOMAKE_OPTIONS} (@pxref{Options}). + +@c FIXME: Remove this "modernization advice" in Automake 1.14 (and adjust +@c FIXME: the error message in m4/init.m4:AM_INIT_AUTOMAKE accordingly). @acindex AC_INIT -This macro can also be called in @emph{another, deprecated form} (support -for which will be @emph{removed in the next major Automake release (1.13)}): +This macro could once (before Automake 1.13) also be called in the +@emph{now obsolete and completely unsupported} form @code{AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])}. In this form, -there are two required arguments: the package and the version number. -This form is obsolete because the @var{package} and @var{version} can -be obtained from Autoconf's @code{AC_INIT} macro (which itself has an -old and a new form). +there were two required arguments: the package and the version number. @anchor{Modernize AM_INIT_AUTOMAKE invocation} If your @file{configure.ac} has: @@ -3962,7 +3962,8 @@ AM_INIT_AUTOMAKE([mumble], [1.5]) @end example @noindent -you should modernize it as follows: +you must modernize it as follows in order to make it work with Automake +1.13 or later: @example AC_INIT([mumble], [1.5]) @@ -9943,27 +9944,8 @@ be read as a side effect of running @command{configure}, like @file{version.sh} in the example above. Speaking of @file{version.sh} scripts, we recommend against them -today. They are mainly used when the version of a package is updated -automatically by a script (e.g., in daily builds). Here is what some -old-style @file{configure.ac}s may look like: - -@example -AC_INIT -. $srcdir/version.sh -AM_INIT_AUTOMAKE([name], $VERSION_NUMBER) -@dots{} -@end example - -@noindent -Here, @file{version.sh} is a shell fragment that sets -@code{VERSION_NUMBER}. The problem with this example is that -@command{automake} cannot track dependencies (listing @file{version.sh} -in @command{CONFIG_STATUS_DEPENDENCIES}, and distributing this file is up -to the user), and that it uses the obsolete form of @code{AC_INIT} and -@code{AM_INIT_AUTOMAKE}. Upgrading to the new syntax is not -straightforward, because shell variables are not allowed in -@code{AC_INIT}'s arguments. We recommend that @file{version.sh} be -replaced by an M4 file that is included by @file{configure.ac}: +today. We recommend that @file{version.sh} be replaced by an M4 file +that is included by @file{configure.ac}: @example m4_include([version.m4]) @@ -9977,9 +9959,7 @@ Here @file{version.m4} could contain something like @samp{m4_define([VERSION_NUMBER], [1.2])}. The advantage of this second form is that @command{automake} will take care of the dependencies when defining the rebuild rule, and will also distribute -the file automatically. An inconvenience is that @command{autoconf} -will now be rerun each time the version number is bumped, when only -@file{configure} had to be rerun in the previous setup. +the file automatically. @node Options diff --git a/m4/init.m4 b/m4/init.m4 index 85228ba..151a59c 100644 --- a/m4/init.m4 +++ b/m4/init.m4 @@ -6,22 +6,13 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 19 +# serial 20 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. +# --------------------------- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow @@ -50,22 +41,18 @@ fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[AC_DIAGNOSE([obsolete], -[$0: two- and three-arguments forms are deprecated. For more info, see: -http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation]) -m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl +dnl Error out on old-style AM_INIT_AUTOMAKE calls. +m4_ifval([$2], [m4_fatal( +[$0: old-style two- and three-arguments forms are now unsupported. For more info: +http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])]) +_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) diff --git a/t/ac-output-old.tap b/t/ac-output-old.tap index 5ba3d3e..7a4d762 100755 --- a/t/ac-output-old.tap +++ b/t/ac-output-old.tap @@ -24,8 +24,6 @@ plan_ 22 rm -f configure.ac depcomp # Not required. -AUTOMAKE="$AUTOMAKE -Wno-obsolete" - # ----------------------------------------------------------------------- # Test for bug reported by François Pinard. @@ -54,18 +52,15 @@ acoutbs_check () } acoutbs_check 1 << 'END' -AC_INIT -AM_INIT_AUTOMAKE(nonesuch, nonesuch) +AC_INIT([acoutbs1], [1.0]) +AM_INIT_AUTOMAKE AC_OUTPUT(Makefile \ zot) END acoutbs_check 2 << 'END' -AC_INIT -AM_INIT_AUTOMAKE(nonesuch, nonesuch) -AC_ARG_PROGRAM -AC_PROG_INSTALL -AC_PROG_MAKE_SET +AC_INIT([acoutbs2], [1.0]) +AM_INIT_AUTOMAKE AC_OUTPUT(\ Makefile \ zot @@ -85,8 +80,8 @@ mkdir acoutnoq cd acoutnoq cat > configure.ac << 'END' -AC_INIT -AM_INIT_AUTOMAKE(nonesuch, nonesuch) +AC_INIT([acoutnoq], [1.0]) +AM_INIT_AUTOMAKE AC_OUTPUT(Makefile, [true]) END @@ -107,8 +102,8 @@ mkdir acoutpt cd acoutpt cat > configure.ac << 'END' -AC_INIT -AM_INIT_AUTOMAKE(nonesuch, nonesuch) +AC_INIT([acoutpt], [1.0]) +AM_INIT_AUTOMAKE AC_OUTPUT([Makefile], [true]) END @@ -163,8 +158,8 @@ mkdir acoutqnl cd acoutqnl cat > configure.ac << 'END' -AC_INIT -AM_INIT_AUTOMAKE(nonesuch, nonesuch) +AC_INIT([acoutqnl], [1.0]) +AM_INIT_AUTOMAKE AC_OUTPUT([Makefile], [echo zardoz has spoken]) END diff --git a/t/acsilent.sh b/t/acsilent.sh index 0f9c1cb..7d13fa0 100755 --- a/t/acsilent.sh +++ b/t/acsilent.sh @@ -19,14 +19,13 @@ . ./defs || Exit 1 cat >configure.ac < acinclude.m4 << 'END' -AC_DEFUN([AM_INIT_GUILE_MODULE],[ -. $srcdir/../GUILE-VERSION -AM_INIT_AUTOMAKE($PACKAGE, $VERSION) +AC_DEFUN([AM_INIT_GUILE_MODULE], [ +AM_INIT_AUTOMAKE([dist-xz]) AC_CONFIG_AUX_DIR(..) module=[$1] AC_SUBST(module)]) diff --git a/t/aminit-moreargs-deprecation.sh b/t/aminit-moreargs-no-more.sh similarity index 73% rename from t/aminit-moreargs-deprecation.sh rename to t/aminit-moreargs-no-more.sh index ac91d1d..d013d9a 100755 --- a/t/aminit-moreargs-deprecation.sh +++ b/t/aminit-moreargs-no-more.sh @@ -14,12 +14,16 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# Check that automake warns against old-style usages of AM_INIT_AUTOMAKE -# (i.e., calls with two or three arguments). +# Check that automake error out (with an helpful error message) against +# old-style usages of AM_INIT_AUTOMAKE (i.e., calls with two or three +# arguments). . ./defs || Exit 1 -warn_rx='AM_INIT_AUTOMAKE.* two-.* three-arguments form.*deprecated' +warn_rx='AM_INIT_AUTOMAKE.* old-style two-.* three-arguments form.*unsupported' + +$ACLOCAL +mv aclocal.m4 aclocal.sav cat > configure.ac <<'END' AC_INIT([Makefile.am]) @@ -27,16 +31,14 @@ AM_INIT_AUTOMAKE([twoargs], [1.0]) AC_CONFIG_FILES([Makefile]) END -$ACLOCAL - do_check() { rm -rf autom4te*.cache - for cmd in "$AUTOCONF" "$AUTOMAKE"; do - $cmd -Werror -Wnone -Wobsolete 2>stderr && { cat stderr; Exit 1; } + for cmd in "$ACLOCAL" "$AUTOCONF" "$AUTOMAKE"; do + cp aclocal.sav aclocal.m4 + $cmd -Wnone -Wno-error 2>stderr && { cat stderr; Exit 1; } cat stderr >&2 grep "^configure\.ac:2:.*$warn_rx" stderr - $cmd -Werror -Wall -Wno-obsolete || Exit 1 done } diff --git a/t/backcompat4.sh b/t/backcompat-acout.sh similarity index 100% rename from t/backcompat4.sh rename to t/backcompat-acout.sh diff --git a/t/backcompat.sh b/t/backcompat.sh deleted file mode 100755 index 8a93141..0000000 --- a/t/backcompat.sh +++ /dev/null @@ -1,64 +0,0 @@ -#! /bin/sh -# Copyright (C) 2010-2012 Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Test usage of AM_INIT_AUTOMAKE with two or three arguments, for -# backward-compatibility. - -. ./defs || Exit 1 - -cat > Makefile.am <<'END' -.PHONY: test display - -## Might be useful for debugging. -display: -## The following should be substituted by AM_INIT_AUTOMAKE. - @echo PACKAGE = $(PACKAGE) - @echo VERSION = $(VERSION) -## The following should not be substituted, as we used the -## old form of AC_INIT. - @echo PACKAGE_NAME = $(PACKAGE_NAME) - @echo PACKAGE_VERSION = $(PACKAGE_VERSION) - @echo PACKAGE_TARNAME = $(PACKAGE_TARNAME) - @echo PACKAGE_STRING = $(PACKAGE_STRING) - -test: display - test x'$(PACKAGE)' = x'FooBar' - test x'$(VERSION)' = x'0.7.1' - test x'$(PACKAGE_NAME)' = x - test x'$(PACKAGE_VERSION)' = x - test x'$(PACKAGE_TARNAME)' = x - test x'$(PACKAGE_STRING)' = x -END - -for ac_init in 'AC_INIT' 'AC_INIT([Makefile.am])'; do - for am_extra_args in '' ', []' ', [:]' ', [false]'; do - rm -rf autom4te*.cache config* Makefile.in Makefile - unindent > configure.in <. - -# Backward-compatibility test: check that AM_INIT_AUTOMAKE with two or -# three arguments does AC_DEFINE the symbols PACKAGE and VERSION iff the -# third argument is empty or non-existent. - -am_create_testdir=empty -. ./defs || Exit 1 - -# A trick to make the test run muuuch faster, by avoiding repeated -# runs of aclocal (one order of magnitude improvement in speed!). -echo 'AC_INIT(x,0) AM_INIT_AUTOMAKE' > configure.in -$ACLOCAL -rm -rf configure.in autom4te.* - -touch install-sh missing - -cat > config.h.in <<'END' -#undef PACKAGE -#undef VERSION -END - -for am_arg3 in ':' 'false' '#' ' '; do - unindent > configure.in < configure.in <. - -# Backward-compatibility test: check what happens when AC_INIT and -# AM_INIT_AUTOMAKE are both given two or more arguments. - -am_create_testdir=empty -. ./defs || Exit 1 - -empty='' - -AUTOMAKE="$AUTOMAKE -Wno-obsolete" - -cat > Makefile.am <<'END' -## Leading ':;' here required to work around bugs of (at least) bash 3.2 -got: Makefile - @:; { \ - echo 'PACKAGE = $(PACKAGE)'; \ - echo 'VERSION = $(VERSION)'; \ - echo 'PACKAGE_NAME = $(PACKAGE_NAME)'; \ - echo 'PACKAGE_VERSION = $(PACKAGE_VERSION)'; \ - echo 'PACKAGE_STRING = $(PACKAGE_STRING)'; \ - echo 'PACKAGE_TARNAME = $(PACKAGE_TARNAME)'; \ - echo 'PACKAGE_BUGREPORT = $(PACKAGE_BUGREPORT)'; \ - echo 'PACKAGE_URL = $(PACKAGE_URL)'; \ - } >$@ -END - - -### Run 1 ### - -cat > configure.in <exp < configure.in <<'END' -dnl: 'AC_INIT' in Autoconf <= 2.63 doesn't have an URL argument. -dnl: Luckily, 'AC_AUTOCONF_VERSION' and 'm4_version_prereq' are -dnl: both present in autoconf 2.62, which we require; so that we -dnl: can at least use the following workaround. -m4_version_prereq([2.64], - [AC_INIT([ac_name], [ac_version], [ac_bugreport], [ac_tarname], - [ac_url])], - [AC_INIT([ac_name], [ac_version], [ac_bugreport], [ac_tarname]) - AC_SUBST([PACKAGE_URL], [ac_url])]) -AM_INIT_AUTOMAKE([am_name], [am_version]) -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT -END - -cat configure.in - -$ACLOCAL -$AUTOCONF -$AUTOMAKE - -./configure - -cat >exp < configure.in <exp <. - -# Backward-compatibility test: try to build and distribute a package -# using obsoleted forms of AC_INIT, AM_INIT_AUTOMAKE and AC_OUTPUT. -# This script can also serve as mild stress-testing for Automake. -# See also the similar test 'backcompat6.test'. - -am_parallel_tests=no -am_create_testdir=empty -. ./defs || Exit 1 - -makefiles='hacky/Makefile src/Makefile data/Makefile tests/Makefile' - -# Yuck! -cat > configure.in < mkfile.am <<'END' -SUBDIRS = src data tests hacky -installcheck-local: - grep DataDataData $(DESTDIR)$(prefix)/data/$(PACKAGE)-$(VERSION)/bar -END - -mkdir hacky src tests data - -echo 'This is a dummy package' > README - -cat > src/foo.input <<'END' -#!sh -echo Zardoz -END - -cat > tests/a.test <<'END' -#!/bin/sh -"$srcdir/../src/foo" | grep Zardoz -END -chmod a+x tests/a.test - -cat > data/bar <<'END' -line1 -line2 -line3 -END - -cat >hacky/Makefile.am <<'END' -dist-hook: - find $(top_distdir) -print - chmod a+rx $(top_distdir)/tests/*.test -END - -cat > src/Makefile.am <<'END' -dist_bin_SCRIPTS = foo -foo: foo.input - sed '1s,^#!.*$$,#!/bin/sh,' $(srcdir)/foo.input >$@ - chmod a+x $@ -EXTRA_DIST = foo.input -DISTCLEANFILES = foo -END - -cat > data/Makefile.am <<'END' -nodist_data_DATA = bar -datadir = $(prefix)/data/$(PACKAGE)-$(VERSION) -bar: - echo DataDataData >$@ -distclean-local: - rm -f bar -END - -cat > tests/Makefile.am <<'END' -TESTS = a.test -EXTRA_DIST = $(TESTS) -END - -$ACLOCAL -$AUTOCONF -$AUTOMAKE -a -Wno-obsolete -test -f install-sh -for f in $makefiles; do mv -f $f.in $f.sav; done -$AUTOMAKE -Wno-obsolete -for f in $makefiles; do diff $f.sav $f.in; done - -./configure -ls -l . hacky src data tests # For debugging. -test ! -f mkfile -$MAKE -$MAKE distdir -test ! -f $distdir/Makefile.in -test ! -f $distdir/data/bar -test -f $distdir/src/foo -diff README $distdir/README -diff mkfile.in $distdir/mkfile.in -diff tests/a.test $distdir/tests/a.test -diff src/foo.input $distdir/src/foo.input - -$MAKE check -$MAKE distcheck - -test -f $distdir.tar.gz - -chmod a-x tests/a.test -# dist-hook should take care of making test files executables. -$MAKE distcheck - -: diff --git a/t/backcompat6.sh b/t/backcompat6.sh deleted file mode 100755 index 4523a65..0000000 --- a/t/backcompat6.sh +++ /dev/null @@ -1,104 +0,0 @@ -#! /bin/sh -# Copyright (C) 2010-2012 Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Backward-compatibility test: try to build and distribute a package -# using obsoleted forms of AC_INIT, AM_INIT_AUTOMAKE and AC_OUTPUT. -# This script can also serve as mild stress-testing for Automake. -# See also the similar test 'backcompat5.test'. - -required=cc -am_create_testdir=empty -. ./defs || Exit 1 - -# Anyone doing something like this in a real-life package probably -# deserves to be killed. -cat > configure.in <<'END' -dnl: Everything here is *deliberately* underquoted! -AC_INIT(quux.c) -PACKAGE=nonesuch-zardoz -VERSION=nonesuch-0.1 -AM_INIT_AUTOMAKE($PACKAGE, $VERSION) -AC_SUBST(one,1) -two=2 -AC_SUBST(two, $two) -three=3 -AC_SUBST(three) -AC_PROG_CC -AC_CONFIG_HEADERS(config.h:config.hin) -AM_CONDITIONAL(CROSS_COMPILING, test "$cross_compiling" = yes) -AC_OUTPUT(Makefile foo.got:foo1.in:foo2.in:foo3.in) -END - -echo @one@ > foo1.in -echo @two@ > foo2.in -echo @three@ > foo3.in - -cat >config.hin <<'END' -#undef PACKAGE -#undef VERSION -END - -cat >> Makefile.am <<'END' -bin_PROGRAMS = foo -foo_SOURCES = quux.c -check-local: - test x'$(PACKAGE)' = x'nonesuch-zardoz' - test x'$(VERSION)' = x'nonesuch-0.1' -if ! CROSS_COMPILING - ./foo -## Do not anchor the regexps w.r.t. the end of line, because on -## MinGW/MSYS, grep may assume LF line endings only, while our -## 'foo' program may generate CRLF line endings. - ./foo | grep '^PACKAGE = nonesuch-zardoz!' - ./foo | echo '^VERSION = nonesuch-0\.1!' -endif -END - -cat > quux.c <<'END' -#include -#include -int main (void) -{ - printf("PACKAGE = %s!\nVERSION = %s!\n", PACKAGE, VERSION); - return 0; -} -END - -$ACLOCAL -$AUTOMAKE -Wno-obsolete --add-missing -$AUTOCONF - -./configure - -cat >foo.exp <<'END' -1 -2 -3 -END - -diff foo.exp foo.got - -$MAKE -$MAKE check - -distdir=nonesuch-zardoz-nonesuch-0.1 -$MAKE distdir -test -f $distdir/quux.c -test ! -f $distdir/foo.got - -$MAKE distcheck - -: diff --git a/t/dirlist.sh b/t/dirlist.sh index 76daa35..98cd710 100755 --- a/t/dirlist.sh +++ b/t/dirlist.sh @@ -19,7 +19,7 @@ . ./defs || Exit 1 cat > configure.ac < acdir/dirlist cat >dirlist-test/dirlist-check.m4 <<'END' AC_DEFUN([AM_INIT_GUILE_MODULE],[ . $srcdir/../GUILE-VERSION -AM_INIT_AUTOMAKE($PACKAGE, $VERSION) +AM_INIT_AUTOMAKE(foreign) AC_CONFIG_AUX_DIR(..) module=[$1] AC_SUBST(module)]) diff --git a/t/dirlist2.sh b/t/dirlist2.sh index f3b9c4d..3eacd2f 100755 --- a/t/dirlist2.sh +++ b/t/dirlist2.sh @@ -19,7 +19,7 @@ . ./defs || Exit 1 cat > configure.ac <dirlist21-test/dirlist21-check.m4 <<'END' -AC_DEFUN([AM_INIT_GUILE_MODULE],[ -. $srcdir/../GUILE-VERSION -AM_INIT_AUTOMAKE($PACKAGE, $VERSION) -AC_CONFIG_AUX_DIR(..) -module=[$1] -AC_SUBST(module)]) +AC_DEFUN([AM_INIT_GUILE_MODULE],[. $srcdir/../GUILE-VERSION]) END cat >dirlist22-test/dirlist22-check.m4 <<'END' diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index e9f8d23..4d6f10b 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -117,7 +117,7 @@ t/alpha2.sh \ t/amhello-cflags.sh \ t/amhello-cross-compile.sh \ t/amhello-binpkg.sh \ -t/aminit-moreargs-deprecation.sh \ +t/aminit-moreargs-no-more.sh \ t/amassign.sh \ t/ammissing.sh \ t/amopt.sh \ @@ -166,12 +166,7 @@ t/auxdir-computed.tap \ t/auxdir-misplaced.sh \ t/auxdir-nonexistent.sh \ t/auxdir-unportable.tap \ -t/backcompat.sh \ -t/backcompat2.sh \ -t/backcompat3.sh \ -t/backcompat4.sh \ -t/backcompat5.sh \ -t/backcompat6.sh \ +t/backcompat-acout.sh \ t/backsl.sh \ t/backsl2.sh \ t/backsl3.sh \ @@ -690,7 +685,6 @@ t/nobase.sh \ t/nobase-libtool.sh \ t/nobase-python.sh \ t/nobase-nodist.sh \ -t/nodef.sh \ t/nodef2.sh \ t/nodep.sh \ t/nodep2.sh \ @@ -1220,8 +1214,6 @@ t/vars3.sh \ t/vartar.sh \ t/vartypos.sh \ t/vartypo2.sh \ -t/version.sh \ -t/version2.sh \ t/version3.sh \ t/version4.sh \ t/version6.sh \ diff --git a/t/nodef.sh b/t/nodef.sh deleted file mode 100755 index 3c55745..0000000 --- a/t/nodef.sh +++ /dev/null @@ -1,58 +0,0 @@ -#! /bin/sh -# Copyright (C) 2002-2012 Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Make sure that PACKAGE and VERSION are AC_DEFINEd when requested. - -. ./defs || Exit 1 - -# ------------------------------------------------------------------- -# Do not upgrade this file to use the modern AC_INIT/AM_INIT_AUTOMAKE -# forms. The day these obsolete AC_INIT and AM_INIT_AUTOMAKE forms -# are dropped, just erase the file. -# nodef2.test contains the modern version of this test. -# ------------------------------------------------------------------- - -# First, check that PACKAGE and VERSION are output by default. - -cat > configure.ac << 'END' -AC_INIT -AM_INIT_AUTOMAKE([UnIqUe_PaCkAgE], [UnIqUe_VeRsIoN]) -AC_OUTPUT(output) -END - -echo 'DEFS = @DEFS@' > output.in - -$ACLOCAL -$AUTOCONF -./configure - -grep 'DEFS.*-DVERSION=\\"UnIqUe' output - -# Then, check that PACKAGE and VERSION are not output if requested. - -cat > configure.ac << 'END' -AC_INIT -AM_INIT_AUTOMAKE([UnIqUe_PaCkAgE], [UnIqUe_VeRsIoN], [no]) -AC_OUTPUT(output) -END - -$ACLOCAL -$AUTOCONF -./configure - -grep 'DEFS.*-DVERSION=\\"UnIqUe' output && Exit 1 - -: diff --git a/t/req.sh b/t/req.sh index cfc3b43..b814ae7 100755 --- a/t/req.sh +++ b/t/req.sh @@ -19,17 +19,12 @@ . ./defs || Exit 1 cat > configure.ac < acinclude.m4 << 'END' -AC_DEFUN([AM_INIT_GUILE_MODULE],[ -. $srcdir/../GUILE-VERSION -AM_INIT_AUTOMAKE($PACKAGE, $VERSION) -AC_CONFIG_AUX_DIR(..) -module=[$1] -AC_SUBST(module)]) +AC_DEFUN([AM_INIT_GUILE_MODULE], [AM_INIT_AUTOMAKE([whocares])]) END $ACLOCAL diff --git a/t/version.sh b/t/version.sh deleted file mode 100755 index 431eb0d..0000000 --- a/t/version.sh +++ /dev/null @@ -1,41 +0,0 @@ -#! /bin/sh -# Copyright (C) 1996-2012 Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Test to make sure [...] is ok in version number. Report from Jim -# Meyering. - -. ./defs || Exit 1 - -cat > configure.ac << 'END' -AC_INIT -AM_INIT_AUTOMAKE([sh-utils], [1.12o]) -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT -END - -: > Makefile.am - -# Files required by Gnits. -: > INSTALL -: > NEWS -: > README -: > COPYING -: > AUTHORS -: > ChangeLog -: > THANKS - -$ACLOCAL -$AUTOMAKE --gnits -Wno-obsolete diff --git a/t/version2.sh b/t/version2.sh deleted file mode 100755 index 273bd36..0000000 --- a/t/version2.sh +++ /dev/null @@ -1,41 +0,0 @@ -#! /bin/sh -# Copyright (C) 1997-2012 Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Test to make sure 3rd arg to AM_INIT_AUTOMAKE not picked up in -# version. From Joel Weber. - -. ./defs || Exit 1 - -cat > configure.ac << 'END' -AC_INIT -AM_INIT_AUTOMAKE([sh-utils], [1.12o], [no]) -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT -END - -: > Makefile.am - -# Files required by Gnits. -: > INSTALL -: > NEWS -: > README -: > COPYING -: > AUTHORS -: > ChangeLog -: > THANKS - -$ACLOCAL -$AUTOMAKE --gnits -Wno-obsolete -- 2.7.4