automake-ng
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-NG] [FYI] [ng] maintcheck: fix several failures (real and spur


From: Stefano Lattarini
Subject: [Automake-NG] [FYI] [ng] maintcheck: fix several failures (real and spurious)
Date: Mon, 2 Jul 2012 23:07:55 +0200

* syntax-checks.mk (ams): Do not mistakenly consider also the directory
'.am' used by Automake-NG internals as a '*.am' makefile fragment.
(sc_no_dotmake_target): Use $(ams) instead of an hand-rolled equivalent
expression.
(sc_no_for_variable_in_macro): Whitelist the "for var in $(am__installdirs)"
usage, since  $(am__installdirs) is already defined as properly quoted.
* t/parallel-tests-recheck-pr11791.sh: Remove uses of the 'using_gmake'
function; of course $MAKE is GNU make in Automake-NG.
* t/remake-recurs-user.sh: Likewise.
* t/recurs-user-keep-going.sh: Likewise.
* t/recurs-user-phony.sh: Do not explicitly require GNU make.
* t/recurs-user-wrap.sh: Likewise.
* t/vartypos.sh: Use 'exit', not 'Exit'.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 syntax-checks.mk                    |   14 +++++++++-----
 t/parallel-tests-recheck-pr11791.sh |    8 ++------
 t/recurs-user-keep-going.sh         |   14 ++++----------
 t/recurs-user-phony.sh              |    3 ---
 t/recurs-user-wrap.sh               |    1 -
 t/remake-recurs-user.sh             |    1 -
 t/vartypos.sh                       |    2 +-
 7 files changed, 16 insertions(+), 27 deletions(-)

diff --git a/syntax-checks.mk b/syntax-checks.mk
index f5a1e25..7bd071f 100644
--- a/syntax-checks.mk
+++ b/syntax-checks.mk
@@ -33,7 +33,7 @@ xtests := $(shell \
 
 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
@@ -131,10 +131,14 @@ sc_rm_minus_f:
        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
@@ -290,7 +294,7 @@ sc_make_simple_include:
 ## by GNU make.  No point in using it.
 sc_no_dotmake_target:
        @files="\
-         `find $(srcdir) -name '*.am'` \
+         $(ams) \
          $(srcdir)/automake.in \
          $(srcdir)/doc/*.texi \
         "; \
diff --git a/t/parallel-tests-recheck-pr11791.sh 
b/t/parallel-tests-recheck-pr11791.sh
index 2d2fc5a..105d51e 100755
--- a/t/parallel-tests-recheck-pr11791.sh
+++ b/t/parallel-tests-recheck-pr11791.sh
@@ -42,10 +42,8 @@ $MAKE check >stdout && { cat stdout; exit 1; }
 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.
@@ -61,10 +59,8 @@ $EGREP '(X?PASS|X?FAIL|SKIP|ERROR):' stdout && exit 1
 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
diff --git a/t/recurs-user-keep-going.sh b/t/recurs-user-keep-going.sh
index 6c2d432..3be5eb4 100755
--- a/t/recurs-user-keep-going.sh
+++ b/t/recurs-user-keep-going.sh
@@ -81,15 +81,9 @@ as_expected ()
 $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
 
 :
diff --git a/t/recurs-user-phony.sh b/t/recurs-user-phony.sh
index 29e50a8..93ee973 100755
--- a/t/recurs-user-phony.sh
+++ b/t/recurs-user-phony.sh
@@ -17,9 +17,6 @@
 # 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'
diff --git a/t/recurs-user-wrap.sh b/t/recurs-user-wrap.sh
index 9c4e375..c2e70b4 100755
--- a/t/recurs-user-wrap.sh
+++ b/t/recurs-user-wrap.sh
@@ -17,7 +17,6 @@
 # Check that rules generated by user recursion are apt to be wrapped
 # by other makefiles.
 
-required=GNUmake
 . ./defs || exit 1
 
 cat >> configure.ac << 'END'
diff --git a/t/remake-recurs-user.sh b/t/remake-recurs-user.sh
index 27e8bad..027fbb7 100755
--- a/t/remake-recurs-user.sh
+++ b/t/remake-recurs-user.sh
@@ -77,7 +77,6 @@ later-target:
 DISTCLEANFILES = zardoz
 END
 
-using_gmake || $MAKE Makefile
 $MAKE
 test -f foo
 test -f oof
diff --git a/t/vartypos.sh b/t/vartypos.sh
index f612a0b..7927163 100755
--- a/t/vartypos.sh
+++ b/t/vartypos.sh
@@ -107,7 +107,7 @@ $MAKE nihil
 $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
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]