xdefs = $(srcdir)/t/ax/test-init.sh $(srcdir)/defs $(srcdir)/defs-static.in
-ams := $(shell find $(srcdir) -name '*.dir' -prune -o -name '*.am' -print)
+ams := $(shell find $(srcdir) -name '*.dir' -prune -o -name '?*.am' -a -print)
pms := $(dist_perllib_DATA)
# Some simple checks, and then ordinary check. These are only really
else :; fi
## Never use something like "for file in $(FILES)", this doesn't work
-## if FILES is empty or if it contains shell meta characters (e.g. $ is
-## commonly used in Java filenames).
+## if FILES is empty or if it contains shell meta characters (e.g. '$'
+## is commonly used in Java filenames). Make an exception for
+## $(am__installdirs), which is already defined as properly quoted.
sc_no_for_variable_in_macro:
- @if grep 'for .* in \$$(' $(ams) | grep -v '/Makefile\.am:'; then \
+ @LC_ALL=C; export LC_ALL; \
+ if grep 'for .* in \$$(' $(ams) | grep -v '/Makefile\.am:' \
+ | grep -Ev '\bfor [a-zA-Z0-9_]+ in \$$\(am__installdirs\)'; \
+ then \
echo 'Use "list=$$(mumble); for var in $$$$list".' 1>&2 ; \
exit 1; \
else :; fi
## by GNU make. No point in using it.
sc_no_dotmake_target:
@files="\
- `find $(srcdir) -name '*.am'` \
+ $(ams) \
$(srcdir)/automake.in \
$(srcdir)/doc/*.texi \
"; \
cat stdout
count_test_results total=1 pass=0 fail=1 xpass=0 xfail=0 skip=0 error=0
-st=0; $MAKE -k recheck >stdout || st=$?
+$MAKE -k recheck >stdout && { cat stdout; exit 1; }
cat stdout
-# Don't trust the exit status of "make -k" for non-GNU makes.
-if using_gmake && test $st -eq 0; then exit 1; fi
count_test_results total=1 pass=0 fail=1 xpass=0 xfail=0 skip=0 error=0
# Introduce an error in foo.c, that should cause a compilation failure.
test -f foo.log
test -f foo.trs
-st=0; $MAKE -k recheck >stdout || st=$?
+$MAKE -k recheck >stdout && { cat stdout; exit 1; }
cat stdout
-# Don't trust the exit status of "make -k" for non-GNU makes.
-if using_gmake && test $st -eq 0; then exit 1; fi
# We don't get a change to run the testsuite.
$EGREP '(X?PASS|X?FAIL|SKIP|ERROR):' stdout && exit 1
test -f foo.log
$MAKE foo && exit 1
find . -name foo | grep . && exit 1
-if using_gmake; then
- $MAKE -k foo && exit 1
- as_expected
- $MAKE --keep-going foo && exit 1
- as_expected
-else
- # Don't trust the exit status of 'make -k' for non-GNU makes.
- $MAKE -k foo || :
- as_expected
-fi
+$MAKE -k foo && exit 1
+as_expected
+$MAKE --keep-going foo && exit 1
+as_expected
:
# Check that user-defined recursive targets and their associate
# '-local', '-am' and '-recursive' targets are declared as phony.
-# Require GNU make, because some vendo makes (e.g., Solaris) doesn't
-# truly respect .PHONY.
-required=GNUmake
. ./defs || exit 1
cat >> configure.ac <<'END'
# Check that rules generated by user recursion are apt to be wrapped
# by other makefiles.
-required=GNUmake
. ./defs || exit 1
cat >> configure.ac << 'END'
DISTCLEANFILES = zardoz
END
-using_gmake || $MAKE Makefile
$MAKE
test -f foo
test -f oof
$sleep
echo none_SOURCES = >> Makefile.am
-$MAKE nihil 2>stderr && { cat stderr >&2; Exit 1; }
+$MAKE nihil 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep "variable 'none_SOURCES'" stderr