[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-1821
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-1821-gd029740 |
Date: |
Sun, 05 Feb 2012 21:05:46 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=d029740b347df2f4792b56d402e9368e8b741c2a
The branch, master has been updated
via d029740b347df2f4792b56d402e9368e8b741c2a (commit)
via d2d18dca6f34c36881b54f45c598e6bbf622be83 (commit)
via da0964eb751461516bda1a38b8423cb412b601d6 (commit)
via d51da57f66d5ad66d1edfe3898baa0bef625f4e1 (commit)
from 6b819187e01cfa365a5bf3b122074c7da28fb8e1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d029740b347df2f4792b56d402e9368e8b741c2a
Author: Stefano Lattarini <address@hidden>
Date: Sun Feb 5 21:22:01 2012 +0100
parallel-tests: more uses for '$(am__make_dryrun)'
With this change we refactor some recipes of the parallel-tests
harness to make them use, where appropriate, the new internal
variable '$(am__make_dryrun)' (introduced in the 'maint' branch)
when they need to determine whether make is running in "dry mode",
i.e., with "make -n". This allows for some simplifications and
for improved uniformity.
* lib/am/check.am (check-TESTS recheck): Use $(am__make_dryrun) and
simplify accordingly.
(am--redo-logs): Delete this internal helper recipe, merged into ...
($(TEST_SUITE_LOG)): ... this, with the help of $(am__make_dryrun).
recipe accordingly.
commit d2d18dca6f34c36881b54f45c598e6bbf622be83
Merge: 6b81918 da0964e
Author: Stefano Lattarini <address@hidden>
Date: Sun Feb 5 18:37:45 2012 +0100
Merge branch 'maint'
* maint:
refactor: new variable telling whether make is running in "dry mode"
tests: do not clobber the modified CC
-----------------------------------------------------------------------
Summary of changes:
lib/am/check.am | 90 ++++++++++++++++++++++++-------------------------
lib/am/distdir.am | 14 ++-----
lib/am/header-vars.am | 17 +++++++++
lib/am/lisp.am | 7 +---
tests/check8.test | 2 +-
5 files changed, 67 insertions(+), 63 deletions(-)
diff --git a/lib/am/check.am b/lib/am/check.am
index fb82137..777cb6f 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -129,36 +129,6 @@ am__set_TESTS_bases = \
rm -f $< $@
$(MAKE) $(AM_MAKEFLAGS) $<
-# Helper recipe used by $(TEST_SUITE_LOG) below, to avoid problems with
-# "make -n". Break this recipe in multiple shell invocations too, to
-# really work as expected with "make -n".
-am--redo-logs:
- @rm -f $$redo_logs
- @rm -f $$redo_results
-## The use of the `am__remaking_logs' environment variable below is
-## required to ensure that we don't go into an infinite recursion in
-## case a test log in $(TEST_LOGS) is the same as $(TEST_SUITE_LOG).
-## Yes, this has already happened in practice. Sigh!
- @if test -n "$$am__remaking_logs"; then \
- echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
- "recursion detected" >&2; \
- else \
- am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
- fi;
-## Sanity check: each unreadable or non-existent test result file should
-## has been properly remade at this point, as should the corresponding log
-## file.
- @st=0; \
- errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
- for i in $$redo_bases; do \
- test -f $$i.trs && test -r $$i.trs \
- || { echo "$$errmsg $$i.trs"; st=1; }; \
- test -f $$i.log && test -r $$i.log \
- || { echo "$$errmsg $$i.log"; st=1; }; \
- done; \
- test $$st -eq 0
-.PHONY: am--redo-logs
-
$(TEST_SUITE_LOG): $(TEST_LOGS)
@$(am__set_TESTS_bases); \
## Helper shell function, tells whether a path refers to an existing,
@@ -178,12 +148,35 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
## tests in order to re-create them.
redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
-## The exported variables are needed by the helper hook.
- redo_bases="$$redo_bases" \
- redo_logs="$$redo_logs" \
- redo_results="$$redo_results" \
- $(MAKE) $(AM_MAKEFLAGS) am--redo-logs || exit 1; \
- else :; fi;
+ if $(am__make_dryrun); then :; else \
+## Break "rm -f" into two calls to minimize the possibility of exceeding
+## command line length limits.
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+ fi; \
+ fi; \
+## Use a trick to to ensure that we don't go into an infinite recursion
+## in case a test log in $(TEST_LOGS) is the same as $(TEST_SUITE_LOG).
+## Yes, this has already happened in practice. Sigh!
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ else \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+## Sanity check: each unreadable or non-existent test result file should
+## has been properly remade at this point, as should the corresponding log
+## file.
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs"; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log"; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
## We need a new subshell to work portably with "make -n", since the
## previous part of the recipe contained a $(MAKE) invocation.
@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
@@ -335,7 +328,7 @@ check-TESTS recheck:
## we rely on .PHONY to work portably.
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
@ws='[ ]'; \
- list=''; $(am__set_TESTS_bases); \
+ log_list='' trs_list=''; $(am__set_TESTS_bases); \
for i in $$bases; do \
## If running a "make recheck", we must only consider tests that had an
## unexpected outcome (FAIL or XPASS) in the earlier run. In particular,
@@ -353,21 +346,26 @@ check-TESTS recheck:
## definition can be problematic. In this particular case, trailing white
## space was known to cause a segmentation fault on Solaris 10 XPG4 make:
## <http://lists.gnu.org/archive/html/bug-automake/2010-08/msg00004.html>
- if test -z "$$list"; then list=$$i.log; else list="$$list $$i.log";
fi; \
+ if test -z "$$log_list"; then \
+ log_list="$$i.log"; \
+ else \
+ log_list="$$log_list $$i.log"; \
+ fi; \
+ if test -z "$$trs_list"; then \
+ trs_list="$$i.trs"; \
+ else \
+ trs_list="$$trs_list $$i.trs"; \
+ fi; \
done; \
## Under "make recheck", remove the .log and .trs files associated
## with the files to recheck, so that those will be rerun by the
## "make test-suite.log" recursive invocation below. But use a proper
## hack to avoid extra files removal when running under "make -n".
- if test $@ = recheck && test -n "$$list"; then \
- { \
- echo 'am--clean: am--clean-log am--clean-trs'; \
- echo 'am--clean-log: ; rm -f $$(am__logs)'; \
- echo 'am--clean-trs: ; rm -f $$(am__logs:.log=.trs)'; \
- } | $(MAKE) $(AM_MAKEFLAGS) -f - am--clean am__logs="$$list" \
- || exit 1; \
+ if test $@ != recheck || $(am__make_dryrun); then :; else \
+ test -z "$$log_list" || rm -f $$log_list; \
+ test -z "$$trs_list" || rm -f $$trs_list; \
fi; \
- $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list"
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"
## Recheck must depend on $(check_SCRIPTS), $(check_PROGRAMS), etc.
recheck: %CHECK_DEPS%
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index 9b0a766..8a64e5a 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -238,19 +238,13 @@ endif %?TOPDIR_P%
## at the top level do the right thing. If we're in the topmost
## directory, then we use `distdir' instead of `top_distdir'; this lets
## us work correctly with an enclosing package.
-##
-## Split the loop for the directory creation and the one for recursion,
-## so that with GNU make -n, only the latter is executed.
if %?SUBDIRS%
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
- || exit 1; \
- fi; \
- done
- @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index d1cd76e..0f05731 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -27,6 +27,23 @@ VPATH = @srcdir@
## a vendor make.
## DESTDIR =
+## Shell code that determines whether make is running in "dry mode"
+## ("make -n") or not. Useful in rules that invoke make recursively,
+## and are thus executed also with "make -n" -- either because they
+## are declared as dependencies to '.MAKE' (NetBSD make), or because
+## their recipes contain the "$(MAKE)" string (GNU and Solari make).
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done; \
+ test $$am__dry = yes; \
+ }
+
## Some derived variables that have been found to be useful.
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index 6ffcdbf..0194c1b 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -52,12 +52,7 @@ $(am__ELCFILES): elc-stamp
##
## If `make -n' is called, do not execute any command in the recipe that
## changes the tree; however, invoke the recursive make for debuggability.
- @dry=; for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=*|--*);; \
- *n*) dry=:;; \
- esac; \
- done; \
+ @if $(am__make_dryrun); then dry=:; else dry=; fi; \
if test "$(EMACS)" != no && test ! -f $@; then \
## If `make -j' is used and more than one file has been erased, several
## processes can execute this block. We have to make sure that only
diff --git a/tests/check8.test b/tests/check8.test
index ae01c13..6906318 100755
--- a/tests/check8.test
+++ b/tests/check8.test
@@ -64,7 +64,7 @@ $AUTOCONF
$AUTOMAKE -a
./configure
-AM_COLOR_TESTS=always $MAKE -e check >stdout 2>stderr &&
+AM_COLOR_TESTS=always $MAKE check >stdout 2>stderr &&
{ cat stdout; cat stderr >&2; Exit 1; }
cat stdout
cat stderr >&2
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-1821-gd029740,
Stefano Lattarini <=