.PHONY: check-pre
check-pre:
@rm -f $(subdirs_to_check:=/test-suite.log)
+
+if AUTOMAKE_1_11
+# automake 1.11 version
check-local:
@$(am__tty_colors); \
echo $${blu}=============================== TESTING SUMMARY =============================$$std; \
if test -s "unit/test-suite.log"; then :; else \
echo "$${red}Unit tests did not run; maybe there were compilation problems ?$$std"; \
- fi; \
+ fi; \
if test -s "system/test-suite.log"; then :; else \
echo "$${red}System tests did not run; maybe there were compilation problems ?$$std"; \
- fi; \
+ fi; \
for dir in $(subdirs_to_check); do \
log=$$dir/test-suite.log; \
if test -s "$$log"; then \
fi; \
done; \
echo $${blu}=============================== TESTING SUMMARY =============================$$std
+else
+# automake 1.12 version
+check-local:
+ @$(am__tty_colors); \
+ echo $${blu}=============================== TESTING SUMMARY =============================$$std; \
+ if test -s "unit/test-suite.log"; then :; else \
+ echo "$${red}Unit tests did not run; maybe there were compilation problems ?$$std"; \
+ fi; \
+ if test -s "system/test-suite.log"; then :; else \
+ echo "$${red}System tests did not run; maybe there were compilation problems ?$$std"; \
+ fi; \
+ for dir in $(subdirs_to_check); do \
+ log=$$dir/test-suite.log; \
+ if test -s "$$log"; then \
+ status="`head -n 11 $$log | tail -7`"; \
+ nicestatus="`echo $$status | sed 's/# [A-Z]*: 0 *//g;s/# \([A-Z]*\): \([0-9]*\)/\2 \1,/g;s/, *$$//;'`"; \
+ if echo "$$status" | grep -q '# FAIL: 0' && \
+ echo "$$status" | grep -q '# XPASS: 0' && \
+ echo "$$status" | grep -q '# ERROR: 0' && \
+ echo "$$status" | grep -q '# SKIP: 0'; then \
+ printf "$$grn%-30s in $$dir$$std\\n" "$$nicestatus"; \
+ else \
+ echo "$$red$$nicestatus"; \
+ echo " @abs_builddir@/$$log$$std"; \
+ fi; \
+ fi; \
+ done; \
+ echo $${blu}=============================== TESTING SUMMARY =============================$$std
+endif