summaryrefslogtreecommitdiff
path: root/lib/am
diff options
context:
space:
mode:
Diffstat (limited to 'lib/am')
-rw-r--r--lib/am/check.am2
-rw-r--r--lib/am/configure.am6
-rw-r--r--lib/am/dejagnu.am2
-rw-r--r--lib/am/depend.am14
4 files changed, 16 insertions, 8 deletions
diff --git a/lib/am/check.am b/lib/am/check.am
index 741a5c0f0..ff174191d 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -401,7 +401,7 @@ RECHECK_LOGS = $(TEST_LOGS)
## Running all tests, or rechecking failures. ##
## ------------------------------------------ ##
-check-TESTS:
+check-TESTS: %CHECK_DEPS%
@list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
## We always have to remove $(TEST_SUITE_LOG), to ensure its rule is run
diff --git a/lib/am/configure.am b/lib/am/configure.am
index 76ecbff5d..ec0b293ad 100644
--- a/lib/am/configure.am
+++ b/lib/am/configure.am
@@ -76,10 +76,10 @@ endif %?TOPDIR_P%
?TOPDIR_P? $(SHELL) ./config.status;; \
?!TOPDIR_P? cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
-## FIXME: $(am__depfiles_maybe) lets us re-run the rule to create the
+## FIXME: $(am__maybe_remake_depfiles) lets us re-run the rule to create the
## .P files. Ideally we wouldn't have to do this by hand.
- echo ' cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__maybe_remake_depfiles);; \
esac;
## Avoid the "deleted header file" problem for the dependencies.
diff --git a/lib/am/dejagnu.am b/lib/am/dejagnu.am
index 75ec97dca..04e97e2b1 100644
--- a/lib/am/dejagnu.am
+++ b/lib/am/dejagnu.am
@@ -33,7 +33,7 @@ check-DEJAGNU: site.exp
## pointless to cause a failure if the tests cannot be run at all.
if $(SHELL) -c "$(RUNTEST) --version" > /dev/null 2>&1; then \
exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \
- if $(RUNTEST) $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
+ if $(RUNTEST) $(RUNTESTDEFAULTFLAGS) $(AM_RUNTESTFLAGS) $(RUNTESTFLAGS); \
then :; else exit_status=1; fi; \
done; \
else echo "WARNING: could not find '$(RUNTEST)'" 1>&2; :;\
diff --git a/lib/am/depend.am b/lib/am/depend.am
index e9875f002..8ce0cd4c7 100644
--- a/lib/am/depend.am
+++ b/lib/am/depend.am
@@ -16,12 +16,20 @@
am__mv = mv -f
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+.PHONY: am--depfiles
+
## This Makefile depends on Depdirs' files, so we should never
## erase them in -am or -recursive rules; that would prevent any other
## rules from being recursive (for instance multilib clean rules are
## recursive).
+if %?DISTRMS%
distclean:
- -rm -rf %DEPDIRS%
-
+ %DISTRMS%
maintainer-clean:
- -rm -rf %DEPDIRS%
+ %DISTRMS%
+endif