make a more working check-local target
authorJohan Danielsson <joda@pdc.kth.se>
Thu, 1 Apr 1999 14:58:43 +0000 (14:58 +0000)
committerJohan Danielsson <joda@pdc.kth.se>
Thu, 1 Apr 1999 14:58:43 +0000 (14:58 +0000)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5819 ec53bebd-3082-4978-b11e-865c3cabbd6b

Makefile.am.common

index d293a48f5abc05b4abc8caa965494c59cc8f6362..f772b9a804d6cf1233b5750ced2d167614791894 100644 (file)
@@ -7,8 +7,29 @@ SUFFIXES += .x
 .x.c:
        @cmp -s $< $@ 2> /dev/null || cp $< $@
 
+CHECK_LOCAL = $(PROGRAMS)
+
 check-local::
-       @foo='$(bin_PROGRAMS) $(libexec_PROGRAMS) $(sbin_PROGRAMS)'; \
-       for i in $$foo; do \
-       if ./$$i --help > /dev/null 2>&1; then :; \
-       else echo "*** $$i failed check ***"; fi; done
+       @foo='$(CHECK_LOCAL)'; \
+         if test "$$foo"; then \
+         failed=0; all=0; \
+         for i in $$foo; do \
+           all=`expr $$all + 1`; \
+           if ./$$i --version > /dev/null 2>&1; then \
+             echo "PASS: $$i"; \
+           else \
+             echo "FAIL: $$i"; \
+             failed=`expr $$failed + 1`; \
+           fi; \
+         done; \
+         if test "$$failed" -eq 0; then \
+           banner="All $$all tests passed"; \
+         else \
+           banner="$$failed of $$all tests failed"; \
+         fi; \
+         dashes=`echo "$$banner" | sed s/./=/g`; \
+         echo "$$dashes"; \
+         echo "$$banner"; \
+         echo "$$dashes"; \
+         test "$$failed" -eq 0; \
+       fi