done; \
## Under "make recheck", remove the logs of 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".
+## below. But avoid extra files removal when running under "make -n".
if test $@ = recheck && test -n "$$list"; then \
- echo "am--clean: ; rm -f $$list" \
- | $(MAKE) $(AM_MAKEFLAGS) -f - am--clean || exit 1; \
+ $(am__make_dryrun) || rm -f $$list || exit 1; \
fi; \
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list"
## 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; \
## 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@
##
## 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