summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2013-05-29 14:54:47 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2013-05-29 14:54:47 +0200
commit649c03b464cf55f50e696ebea482c65339ff4832 (patch)
tree10d5087bb49cdd1c925b44a3f5f68cfe527b6bae
parentc98d5235fca742991504a7e85b9da02a08bba6dc (diff)
parenteefd01b3fb3f233bcaffdd0aedc611dd819634aa (diff)
downloadautomake-649c03b464cf55f50e696ebea482c65339ff4832.tar.gz
Merge branch 'micro' into maint
* micro: t/README: document "run_make", discourage "make -e" cosmetics: tiny whitespace fixlets tests: avoid a spurious failure with MSVC tests: avoid a spurious failure on non-POSIX systems
-rw-r--r--maintainer/maint.mk2
-rw-r--r--t/README28
-rw-r--r--t/ax/am-test-lib.sh2
-rw-r--r--t/lex-header.sh1
-rw-r--r--t/yacc-bison-skeleton.sh1
5 files changed, 21 insertions, 13 deletions
diff --git a/maintainer/maint.mk b/maintainer/maint.mk
index baa838126..3fe6cce63 100644
--- a/maintainer/maint.mk
+++ b/maintainer/maint.mk
@@ -557,7 +557,7 @@ check-minimal-autoconf:
#
# NOTE (from Stefano Lattarini):
-#
+#
# This section is mostly hacky and ad-hoc, but works for me and
# on my system. And while far from clean, it should help catching
# real regressions on real world packages, which is important.
diff --git a/t/README b/t/README
index 60eb7c76d..23dd943f5 100644
--- a/t/README
+++ b/t/README
@@ -200,6 +200,24 @@ Writing test cases
$PERL, $MAKE, $EGREP, and $FGREP, instead of the corresponding
commands.
+* When you want to redirect the output from a make invocation, use the
+ 'run_make' function rather than calling $MAKE directly. Not only is
+ this more idiomatic, but it also avoid possible spurious racy failures
+ when the make invocations in the testsuite are run in parallel mode
+ (as with "make check AM_TESTSUITE_MAKE='make -j4"').
+
+* Do not override Makefile variables using make arguments, as in e.g.:
+
+ $MAKE prefix=/opt install # BAD
+
+ This is not portable for recursive targets (with non-GNU make,
+ targets that call a sub-make may not pass "prefix=/opt" along).
+ Instead, use the 'run_make' function, which automatically uses
+ the AM_MAKEFLAGS to propagate the variable definitions along to
+ sub-make:
+
+ run_make prefix=/opt install # GOOD
+
* Use '$sleep' when you have to make sure that some file is newer
than another.
@@ -283,13 +301,3 @@ Writing test cases
Note this doesn't prevent the test from failing for another reason,
but at least it makes sure the original error is still here.
-
-* Do not override Makefile variables using make arguments, as in e.g.:
-
- $MAKE prefix=/opt install
-
- This is not portable for recursive targets (targets that call a
- sub-make may not pass "prefix=/opt" along). Use the following
- instead:
-
- prefix=/opt $MAKE -e install
diff --git a/t/ax/am-test-lib.sh b/t/ax/am-test-lib.sh
index 1ce3b7dfb..182b070a0 100644
--- a/t/ax/am-test-lib.sh
+++ b/t/ax/am-test-lib.sh
@@ -398,7 +398,6 @@ grep_configure_help ()
$EGREP "$2" am--our-help || exit 1
}
-
# using_gmake
# -----------
# Return success if $MAKE is GNU make, return failure otherwise.
@@ -509,7 +508,6 @@ am__useless_vpath_rebuild=""
yl_distcheck () { useless_vpath_rebuild || run_make distcheck ${1+"$@"}; }
-
null_install ()
{
for am__v in nulldirs destdir instdir; do
diff --git a/t/lex-header.sh b/t/lex-header.sh
index 005ae8692..0789af4ed 100644
--- a/t/lex-header.sh
+++ b/t/lex-header.sh
@@ -55,6 +55,7 @@ cat > lexer.l << 'END'
END
cat > main.c <<'END'
+#define YY_NO_UNISTD_H 1
#include "mylex.h"
int main (void)
{
diff --git a/t/yacc-bison-skeleton.sh b/t/yacc-bison-skeleton.sh
index b89d44c13..4553f7e50 100644
--- a/t/yacc-bison-skeleton.sh
+++ b/t/yacc-bison-skeleton.sh
@@ -22,6 +22,7 @@ required='cc bison'
cat >> configure.ac << 'END'
AC_PROG_CC
+AC_C_INLINE dnl Required by some pre-C99 compilers such as MSVC.
AC_PROG_YACC
AC_OUTPUT
END