From: Stefano Lattarini Date: Sat, 28 Jan 2012 11:38:07 +0000 (+0100) Subject: maintcheck: take advantage of some GNU make features X-Git-Tag: v1.11b~195 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=25d3adb1b25132d5051dd97dacc707d2f3375a90;p=platform%2Fupstream%2Fautomake.git maintcheck: take advantage of some GNU make features We can do so now that our maintainer checks require GNU make unconditionally. * syntax-check.mk (ams, xtests): Redefine as "immediate variables", using the GNU make $(shell ...) builtin. (maintainer-check-list-of-tests): Take advantage of GNU make "-C" option. Don't use $(AM_MAKEFLAGS), we shouldn't need it with GNU make. --- diff --git a/syntax-checks.mk b/syntax-checks.mk index 0384202..4da3974 100644 --- a/syntax-checks.mk +++ b/syntax-checks.mk @@ -19,8 +19,8 @@ # tests might be in `$(builddir)' rather than in `$(srcdir)'), TAP-based # tests script (which have a `.tap' extension) and helper scripts used # by other test cases (which have a `.sh' extension). -xtests = \ - `if test $(srcdir) = .; then \ +xtests := $(shell \ + if test $(srcdir) = .; then \ dirs=.; \ else \ dirs='$(srcdir) .'; \ @@ -29,9 +29,9 @@ xtests = \ for s in test tap sh; do \ ls $$d/tests/*.$$s 2>/dev/null; \ done; \ - done | sort` + done | sort) -ams = `find $(srcdir) -name '*.am'` +ams := $(shell find $(srcdir) -name '*.am') # Some simple checks, and then ordinary check. These are only really # guaranteed to work on my machine. @@ -89,7 +89,7 @@ maintainer-check: $(syntax_check_rules) ## list of all test scripts in the Automake testsuite. .PHONY: maintainer-check-list-of-tests maintainer-check-list-of-tests: - $(am__cd) tests && $(MAKE) $(AM_MAKEFLAGS) $@ + $(MAKE) -C tests $@ maintainer-check: maintainer-check-list-of-tests ## Look for test whose names can cause spurious failures when used as