* build-aux/check.mk ($(TEST_LOGS)) [!GNU_MAKE]: Check for
a $(TESTS) test in the build dir, before one in srcdir. For details,
see <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/14198>.
DEPENDENCY = CHECK-FORCE
$(TEST_LOGS): $(DEPENDENCY)
@if test '$(DEPENDENCY)' = CHECK-FORCE; then \
- dst=$@; \
- exec $(MAKE) $(AM_MAKEFLAGS) DEPENDENCY='$(srcdir)'/$${dst%.log} $@;\
+ dst=$@; src=$${dst%.log}; \
+ test -x "$$src" || src='$(srcdir)'/$$src; \
+ exec $(MAKE) $(AM_MAKEFLAGS) DEPENDENCY="$$src" $@; \
else \
src='$(DEPENDENCY)'; \
$(am__check_pre) "$$dir$$src" $(am__check_post); \