esac
}
+ # make_can_chain_suffix_rules
+ # ---------------------------
+ # Return 0 if $MAKE is a make implementation that can chain suffix rules
+ # automatically, return 1 otherwise. Caches the result for speed reasons.
+ make_can_chain_suffix_rules ()
+ {
+ if test -z "$am__can_chain_suffix_rules"; then
+ if using_gmake; then
+ am__can_chain_suffix_rules=yes
+ return 0
+ else
+ mkdir am__chain.dir$$
+ cd am__chain.dir$$
+ unindent > Makefile << 'END'
+ .u.v: ; cp $< $@
+ .v.w: ; cp $< $@
+ END
+ echo make can chain suffix rules > foo.u
+ if $MAKE foo.w && diff foo.u foo.w; then
+ am__can_chain_suffix_rules=yes
+ else
+ am__can_chain_suffix_rules=no
+ fi
+ cd ..
+ rm -rf am__chain.dir$$
+ fi
+ fi
+ case $am__can_chain_suffix_rules in
+ yes) return 0;;
+ no) return 1;;
+ *) fatal_ "make_can_chain_suffix_rules: internal error";;
+ esac
+ }
+ am__can_chain_suffix_rules="" # Avoid interferences from the environment.
+
+# count_test_results total=N pass=N fail=N xpass=N xfail=N skip=N error=N
+# -----------------------------------------------------------------------
+# Check that a testsuite run driven by the parallel-tests harness has
+# had the specified numbers of test results (specified by kind).
+# This function assumes that the output of "make check" or "make recheck"
+# has been saved in the `stdout' file in the current directory, and its
+# log in the `test-suite.log' file.
+count_test_results ()
+{
+ # Use a subshell so that we won't pollute the script namespace.
+ (
+ # TODO: Do proper checks on the arguments?
+ total=ERR pass=ERR fail=ERR xpass=ERR xfail=ERR skip=ERR error=ERR
+ eval "$@"
+ # For debugging.
+ $EGREP -i '(total|x?pass|x?fail|skip|error)' stdout || :
+ rc=0
+ # Avoid spurious failures with shells with "overly sensible"
+ # `errexit' shell flag, such as e.g., Solaris /bin/sh.
+ set +e
+ test `grep -c '^PASS:' stdout` -eq $pass || rc=1
+ test `grep -c '^XFAIL:' stdout` -eq $xfail || rc=1
+ test `grep -c '^SKIP:' stdout` -eq $skip || rc=1
+ test `grep -c '^FAIL:' stdout` -eq $fail || rc=1
+ test `grep -c '^XPASS:' stdout` -eq $xpass || rc=1
+ test `grep -c '^ERROR:' stdout` -eq $error || rc=1
+ grep "^# TOTAL: *$total$" stdout || rc=1
+ grep "^# PASS: *$pass$" stdout || rc=1
+ grep "^# XFAIL: *$xfail$" stdout || rc=1
+ grep "^# SKIP: *$skip$" stdout || rc=1
+ grep "^# FAIL: *$fail$" stdout || rc=1
+ grep "^# XPASS: *$xpass$" stdout || rc=1
+ grep "^# ERROR: *$error$" stdout || rc=1
+ test $rc -eq 0
+ )
+}
+
commented_sed_unindent_prog='
/^$/b # Nothing to do for empty lines.
x # Get x<indent> into pattern space.