summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS6
-rw-r--r--NEWS23
-rw-r--r--doc/automake.texi8
-rw-r--r--lib/am/header-vars.am57
-rwxr-xr-xt/ar-lib4.sh2
-rwxr-xr-xt/lisp-flags.sh2
-rw-r--r--t/list-of-tests.mk3
-rwxr-xr-xt/make-dryrun.tap4
-rwxr-xr-xt/make-is-gnu.sh66
9 files changed, 145 insertions, 26 deletions
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.
diff --git a/NEWS b/NEWS
index 1d0d78927..8e31050f0 100644
--- a/NEWS
+++ b/NEWS
@@ -206,12 +206,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 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
+
+ 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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/doc/automake.texi b/doc/automake.texi
index d420d28ed..dda78a512 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
@@ -9099,6 +9101,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
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index 9fda37cbe..d2f098425 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -26,32 +26,57 @@ 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; \
- 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 ;; \
+ *) \
+ 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 ;;\
+ esac; \
+ fi; \
test $$am__dry = yes; \
}
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'
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
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index a610169b5..860aff1c6 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -666,8 +666,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-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" \
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 <http://www.gnu.org/licenses/>.
+
+# 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
+
+: