summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--THANKS1
-rw-r--r--t/list-of-tests.mk2
-rwxr-xr-xt/subdir-keep-going-pr12554.sh70
3 files changed, 73 insertions, 0 deletions
diff --git a/THANKS b/THANKS
index cf4697277..f05d0c403 100644
--- a/THANKS
+++ b/THANKS
@@ -257,6 +257,7 @@ Maxim Sinev good@goods.ru
Maynard Johnson maynardj@us.ibm.com
Merijn de Jonge M.de.Jonge@cwi.nl
Michael Brantley Michael-Brantley@deshaw.com
+Michael Daniels mdaniels@rim.com
Michael Hofmann mhofma@googlemail.com
Michael Ploujnikov ploujj@gmail.com
Michel de Ruiter mdruiter@cs.vu.nl
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index c72a63638..fbe2b56e4 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -41,6 +41,7 @@ t/remake-timing-bug-pr8365.sh \
t/lex-subobj-nodep.sh \
t/remake-am-pr10111.sh \
t/remake-m4-pr10111.sh \
+t/subdir-keep-going-pr12554.sh \
$(perl_fake_XFAIL_TESTS)
perl_TESTS = \
@@ -1015,6 +1016,7 @@ t/subdir-order.sh \
t/subdir-with-slash.sh \
t/subdir-subsub.sh \
t/subdir-distclean.sh \
+t/subdir-keep-going-pr12554.sh \
t/subobj.sh \
t/subobj2.sh \
t/subobj4.sh \
diff --git a/t/subdir-keep-going-pr12554.sh b/t/subdir-keep-going-pr12554.sh
new file mode 100755
index 000000000..03d5cb048
--- /dev/null
+++ b/t/subdir-keep-going-pr12554.sh
@@ -0,0 +1,70 @@
+#! /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 the Automake-generated recursive rules are resilient against
+# false positives in deciding whether make is running with the '-k'
+# option, and thus whether a failure into one of the $(SUBDIRS) should
+# still prevent recursion in the following $(SUBDIRS) entries. See
+# automake bug#12544.
+
+. test-init.sh
+
+echo nil: | $MAKE -I . -f - || skip_ "$MAKE doesn't support the -I option"
+
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
+AC_OUTPUT
+END
+
+mkdir k ./--keep-going sub1 sub2
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub1 sub2
+END
+
+cat > sub1/Makefile.am <<'END'
+all-local:
+ touch ko
+ false
+END
+cat > sub2/Makefile.am <<'END'
+all-local:
+ test -f ../sub1/ko
+ touch ok
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+st=0
+$MAKE -I k -I --keep-going \
+ TESTS='k --keep-going -k' AM_MAKEFLAGS="TESTS='k --keep-going -k'" \
+ || st=$?
+# Don't trust the exit status of "make -k" for non-GNU make.
+if using_gmake; then
+ test $st -gt 0 || exit 1
+fi
+test ! -r sub2/ok
+
+# Sanity check.
+st=0; $MAKE -k || st=$?
+if { using_gmake && test $st -eq 0; } || test ! -f sub2/ok; then
+ fatal_ '"make -k" not working as expected'
+fi
+
+: