2 # Copyright (C) 2013-2018 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <https://www.gnu.org/licenses/>.
17 # Check that the Automake-generated recursive rules are resilient against
18 # false positives in deciding whether make is running with the '-k'
19 # option, and thus whether a failure into one of the $(SUBDIRS) should
20 # still prevent recursion in the following $(SUBDIRS) entries. See
25 echo nil
: |
$MAKE -I .
-f - || skip_
"$MAKE doesn't support the -I option"
27 cat >> configure.ac
<<'END'
28 AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
32 mkdir k .
/--keep-going sub1 sub2
34 cat > Makefile.am
<<'END'
38 cat > sub
1/Makefile.am
<<'END'
43 cat > sub
2/Makefile.am
<<'END'
55 $MAKE -I k
-I --keep-going \
56 TESTS
='k --keep-going -k' AM_MAKEFLAGS
="TESTS='k --keep-going -k'" \
58 # Don't trust the exit status of "make -k" for non-GNU make.
60 test $st -gt 0 ||
exit 1
65 st
=0; $MAKE -k || st
=$?
66 if { using_gmake
&& test $st -eq 0; } ||
test ! -f sub
2/ok
; then
67 fatal_
'"make -k" not working as expected'