From 40f949c71a05c411989746e74e661323b62ce083 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sun, 21 Apr 2013 10:38:29 +0200 Subject: NEWS: document fix for automake bug#13514 It was fixed by commit v1.13.1b-5-g7a3d7ce. Signed-off-by: Stefano Lattarini --- NEWS | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/NEWS b/NEWS index 81377e104..06c012fee 100644 --- a/NEWS +++ b/NEWS @@ -134,6 +134,17 @@ New in 1.13.2: some pre-existing real-world usages; refer to automake bug#13514 for more details. + - Aclocal no longer consider directories for extra m4 files more than + once, even if they are specified multiple times. This prevents + problems in older packages that specify both + + AC_CONFIG_MACRO_DIR([m4]) in configure.ac + ACLOCAL_AMFLAGS = -I m4 in Makefile.am + + If the 'm4' directory did not exist when aclocal was called the first + time by autoreconf, an error would have ensued with Automake 1.13 and + 1.13.1. See automake bug#13514. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ New in 1.13.1: -- cgit v1.2.1 From 2d47361d9b5a8f313408c940ed23a24592db88f7 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sun, 21 Apr 2013 16:59:05 +0200 Subject: NEWS: improve wording for automake bug#13514 fix Helped-by: Jack Kelly Signed-off-by: Stefano Lattarini --- NEWS | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/NEWS b/NEWS index 06c012fee..6597626ee 100644 --- a/NEWS +++ b/NEWS @@ -127,23 +127,23 @@ New in 1.13.2: Automake 1.13, has turned out to be a similarly very bad idea, for exactly the same reason. - - Aclocal no longer error out if the first local m4 directory (as - specified by the '-I' option or the 'AC_CONFIG_MACRO_DIRS' or - 'AC_CONFIG_MACRO_DIR' macros) doesn't exist; it merely report a - warning in the 'unsupported' category. This is done to support - some pre-existing real-world usages; refer to automake bug#13514 - for more details. + - aclocal will no longer error out if the first local m4 directory + (as specified by the '-I' option or the 'AC_CONFIG_MACRO_DIRS' or + 'AC_CONFIG_MACRO_DIR' macros) doesn't exist; it will merely report + a warning in the 'unsupported' category. This is done to support + some pre-existing real-world usages. See automake bug#13514. - - Aclocal no longer consider directories for extra m4 files more than - once, even if they are specified multiple times. This prevents - problems in older packages that specify both + - aclocal will no longer consider directories for extra m4 files more + than once, even if they are specified multiple times. This ensures + packages that specify both AC_CONFIG_MACRO_DIR([m4]) in configure.ac ACLOCAL_AMFLAGS = -I m4 in Makefile.am - If the 'm4' directory did not exist when aclocal was called the first - time by autoreconf, an error would have ensued with Automake 1.13 and - 1.13.1. See automake bug#13514. + will work correctly, even when the 'm4' directory contains no + package-specific files, but is used only to install third-party + m4 files (as can happen with e.g., "libtoolize --install"). + See automake bug#13514. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.2.1 From 3de27839c88bda6c755f00c7142620080b725be0 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Mon, 22 Apr 2013 14:53:14 +0200 Subject: header vars: can determine whether we are running under GNU make This is mostly a preparatory patch in view of future changes. * lib/am/header-vars.am (am__is_gnu_make): New, contains shell code that determines whether we are running under GNU make. * t/make-is-gnu.sh: New test. * t/list-of-tests.mk: Add it. Signed-off-by: Stefano Lattarini --- lib/am/header-vars.am | 6 ++++- t/list-of-tests.mk | 3 ++- t/make-is-gnu.sh | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+), 2 deletions(-) create mode 100755 t/make-is-gnu.sh diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am index 9fda37cbe..8295a9994 100644 --- a/lib/am/header-vars.am +++ b/lib/am/header-vars.am @@ -26,12 +26,16 @@ VPATH = @srcdir@ ## a vendor make. ## DESTDIR = +## Shell code that determines whether we are running under GNU make. +## This is somewhat of an hack, and might be improved, but is good +## enough for now. +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' + ## Shell code that determines whether make is running in "dry mode" ## ("make -n") or not. Useful in rules that invoke make recursively, ## and are thus executed also with "make -n" -- either because they ## are declared as dependencies to '.MAKE' (NetBSD make), or because ## their recipes contain the "$(MAKE)" string (GNU and Solaris make). - am__make_dryrun = \ { \ am__dry=no; \ diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index f1e3dca81..c72a63638 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -664,8 +664,9 @@ t/makej.sh \ t/makej2.sh \ t/maken.sh \ t/maken3.sh \ -t/make-dryrun.tap \ t/makevars.sh \ +t/make-dryrun.tap \ +t/make-is-gnu.sh \ t/man.sh \ t/man2.sh \ t/man3.sh \ diff --git a/t/make-is-gnu.sh b/t/make-is-gnu.sh new file mode 100755 index 000000000..c37cc17af --- /dev/null +++ b/t/make-is-gnu.sh @@ -0,0 +1,66 @@ +#! /bin/sh +# Copyright (C) 2013 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 . + +# Check that $(am__is_gnu_make) can be used to correctly determine if +# we are running under GNU make. + +. test-init.sh + +if using_gmake; then + as_expected () { test $1 -eq 0 && test -f ok && test ! -e ko; } +else + as_expected () { test $1 -gt 0 && test -f ko && test ! -e ok; } +fi + +echo AC_OUTPUT >> configure.ac + +cat > Makefile.am <<'END' +all: file + $(am__is_gnu_make) +file: + if $(am__is_gnu_make); then : > ok; else : > ko; fi +END + +$ACLOCAL +$AUTOCONF +$AUTOMAKE +./configure + +st=0; $MAKE || st=$? +if using_gmake; then + test $st -eq 0 + test -f ok + test ! -e ko +else + test $st -gt 0 + test -f ko + test ! -e ok +fi + +rm -f ok ko + +$MAKE -s file >output 2>&1 +cat output +if using_gmake; then + test -f ok + test ! -e ko +else + test -f ko + test ! -e ok +fi +test ! -s output + +: -- cgit v1.2.1 From 334a2e0b46c3d17ffb24f415cbec2e13e48b6c94 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Mon, 22 Apr 2013 15:07:43 +0200 Subject: dry-run: with GNU make, prefer $(MFLAGS) over $(MAKEFLAGS) Fixes automake bug#13760 for GNU make. * lib/am/header-vars.am (am__make_dryrun): If GNU make is being used, rely on the contents of the $(MFLAGS) variable rather than of the $(MAKEFLAGS) to decide whther make is being executed in "dry run" mode. Not only this makes the code possibly faster and less brittle, but also fixes automake bug#13760 (at least when GNU make is in use). * t/make-dryrun.tap: Adjust: some tests that were xfailing now pass. Signed-off-by: Stefano Lattarini --- lib/am/header-vars.am | 43 ++++++++++++++++++++++++++++--------------- t/make-dryrun.tap | 4 ++-- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am index 8295a9994..23c627ed2 100644 --- a/lib/am/header-vars.am +++ b/lib/am/header-vars.am @@ -39,23 +39,36 @@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_dryrun = \ { \ am__dry=no; \ - case $$MAKEFLAGS in \ -## If we run "make TESTS='snooze nap'", GNU make will export MAKEFLAGS -## to "TESTS=foo\ nap", so that the simpler loop below (on word-splitted + if $(am__is_gnu_make); then \ +## GNU make: $(MAKEFLAGS) is quite tricky there, and the older +## $(MFLAGS) variable behaves much better. + for am__flg in $$MFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + -*n*) am__dry=yes; break;; \ + esac; \ + done; \ + else \ +## Non-GNU make: we must rely on $(MAKEFLAGS). This is tricky and brittle, +## but is the best we can do. + case $$MAKEFLAGS in \ +## If we run "make TESTS='snooze nap'", FreeBSD make will export MAKEFLAGS +## to " TESTS=foo\ nap", so that the simpler loop below (on word-splitted ## $$MAKEFLAGS) would see a "make flag" equal to "nap", and would wrongly ## misinterpret that as and indication that make is running in dry mode. -## This has already happened in practice. So we need this hack. - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ +## This has already happened in practice. So we need this unpleasant hack. + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes ;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done ;;\ + esac; \ + fi; \ test $$am__dry = yes; \ } diff --git a/t/make-dryrun.tap b/t/make-dryrun.tap index 1459a9f37..208b4210b 100755 --- a/t/make-dryrun.tap +++ b/t/make-dryrun.tap @@ -112,10 +112,10 @@ check_make --dry -C using_gmake "\$MAKE is not GNU make" --dry-run -k pr='bug#13760' -check_make --run -X -C make_supports_option_I "-I make option unsupported" \ +check_make --run -C make_supports_option_I "-I make option unsupported" \ -M "$pr" -I none -check_make --run -X -C using_gmake "\$MAKE is not GNU make" \ +check_make --run -C using_gmake "\$MAKE is not GNU make" \ -M "$pr" -I none --include dry-run check_make --dry -C make_supports_option_I "-I make option unsupported" \ -- cgit v1.2.1 From df375ef1c7f57bea5140b446ddd8ffb255913480 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Mon, 22 Apr 2013 23:37:11 +0200 Subject: tests: avoid a spurious failure with the Korn Shell * t/list-flags.sh: Ensure the EMACS variable is set before unsetting it. Signed-off-by: Stefano Lattarini --- t/lisp-flags.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/lisp-flags.sh b/t/lisp-flags.sh index a31bcfdf0..1ea5b8e34 100755 --- a/t/lisp-flags.sh +++ b/t/lisp-flags.sh @@ -20,7 +20,7 @@ # Don't get fooled when running as an Emacs subprocess. This is # for the benefit of the "make -e" invocation below. -unset EMACS +EMACS=; unset EMACS cat > Makefile.am << 'EOF' lisp_LISP = foo.el -- cgit v1.2.1 From cfe0abc7fcedfac86c8928a7dce41aeb41f461a9 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Mon, 22 Apr 2013 18:02:07 +0200 Subject: dry-run: don't get confused by '-I' option Fixes automake bug#13760 for non-GNU make implementations that still support the option '-I'. So far, the only such make implementation are FreeBSD (8.x) make and NetBSD (5.x) make. * lib/am/header-vars.am (am__make_dryrun): If a non-GNU make is being used, try to handle the '-I' option in $MAKEFLAGS correctly. For GNU make, that is already done by the proper use of the $MFLAGS variable. Signed-off-by: Stefano Lattarini --- lib/am/header-vars.am | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am index 23c627ed2..d2f098425 100644 --- a/lib/am/header-vars.am +++ b/lib/am/header-vars.am @@ -61,9 +61,17 @@ am__make_dryrun = \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes ;; \ *) \ + am__skip_next=no; \ for am__flg in $$MAKEFLAGS; do \ + if test $$am__skip_next = yes; then \ + am__skip_next=no; \ + continue; \ + fi; \ case $$am__flg in \ *=*|--*) ;; \ +## Quite ugly special-casing. We might need other similar, but let's +## wait until the need arises. + -I) am__skip_next=yes;; \ *n*) am__dry=yes; break;; \ esac; \ done ;;\ -- cgit v1.2.1 From d23c55c2ef93c4678c5ded559663aa70699ff1d6 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Thu, 25 Apr 2013 21:20:11 +0200 Subject: authors: add myself Signed-off-by: Stefano Lattarini --- AUTHORS | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/AUTHORS b/AUTHORS index e63f8b777..a3c5c0113 100644 --- a/AUTHORS +++ b/AUTHORS @@ -19,3 +19,9 @@ Alexandre Duret-Lutz Ralf Wildenhues Random breakage. Maintenance since 2006. + +Stefano Lattarini + Testsuite overhaul. + TAP support and custom testsuite drivers. + Random breakage. + De-facto maintenance since 2012. -- cgit v1.2.1 From fa55c5d8b1f37114c7c908957e9165b5accdd655 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Thu, 25 Apr 2013 21:34:17 +0200 Subject: docs: add myself and Ralf Wildenhues as authors * doc/automake.texi: Here. Signed-off-by: Stefano Lattarini --- doc/automake.texi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/automake.texi b/doc/automake.texi index e700ab9d0..d3aefb5a2 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -53,6 +53,8 @@ section entitled ``GNU Free Documentation License.'' @author David MacKenzie @author Tom Tromey @author Alexandre Duret-Lutz +@author Ralf Wildenhues +@author Stefano Lattarini @page @vskip 0pt plus 1filll @insertcopying -- cgit v1.2.1 From 13ca4c137dd5b33778861b82dfd1738fd601fb4f Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sat, 20 Apr 2013 22:46:30 +0200 Subject: tests: avoid possible autotools caching issues (automake bug#13832) * t/ar-lib4.sh: Here, by removing the autom4te cache before editing configure.ac and re-running the autotools. Signed-off-by: Stefano Lattarini --- t/ar-lib4.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/ar-lib4.sh b/t/ar-lib4.sh index 68615e829..4d3c40ae0 100755 --- a/t/ar-lib4.sh +++ b/t/ar-lib4.sh @@ -39,6 +39,8 @@ AUTOMAKE_fails grep 'requires.*AM_PROG_AR' stderr +rm -rf autom4te*.cache + cp X configure.ac cat >> configure.ac << 'END' -- cgit v1.2.1 From 526df875677f9e67b86c89ad1c611a77cb924662 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Thu, 25 Apr 2013 21:03:40 +0200 Subject: docs: issues with configure substitutions in TESTS Motivated by automake bug#14019. * doc/automake.texi: Currently, when the parallel test harness is in use, configure substitutions in TESTS definitions can only work if they expand to tests that ends with a suffix listed in TEST_EXTENSIONS. Document this limitation. Signed-off-by: Stefano Lattarini --- doc/automake.texi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/automake.texi b/doc/automake.texi index d3aefb5a2..e52cc3afe 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -9089,6 +9089,12 @@ followed by any number of alphabetic characters. For example, @samp{.sh}, @samp{.T} and @samp{.t1} are valid extensions, while @samp{.x-y}, @samp{.6c} and @samp{.t.1} are not. +@cindex Configure substitutions in @code{TESTS} +It is important to note that, due to current limitations (unlikely to be +lifted), configure substitutions in the definition of @code{TESTS} can +only work if they will expand to a list of tests that have a suffix listed +in @code{TEST_EXTENSIONS}. + @vindex _LOG_COMPILE @vindex _LOG_COMPILER @vindex _LOG_FLAGS -- cgit v1.2.1