summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-11-11 13:12:17 -0800
committerJunio C Hamano <gitster@pobox.com>2008-11-11 13:12:17 -0800
commit912f9980d233961c48a225cce2657f165c98c8ae (patch)
treeed0e2c02660304a1dcdb31d8c97ddffca937f423
parent5bcce8494a2ee09250404b8b086cbd62f9506703 (diff)
downloadgit-912f9980d233961c48a225cce2657f165c98c8ae.tar.gz
Makefile: help people who run 'make check' by mistake
The target to run self test is 'make test', but there are people who try 'make check' and worse yet do not have sparse installed. Suggest 'make test' target when they do not have 'sparse'. Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index becd008e04..186a8efd1b 100644
--- a/Makefile
+++ b/Makefile
@@ -1329,7 +1329,16 @@ check-sha1:: test-sha1$X
./test-sha1.sh
check: common-cmds.h
- for i in *.c; do sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || exit; done
+ if sparse; \
+ then \
+ for i in *.c; \
+ do \
+ sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || exit; \
+ done; \
+ else \
+ echo 2>&1 "Did you mean 'make test'?"; \
+ exit 1; \
+ fi
remove-dashes:
./fixup-builtins $(BUILT_INS) $(PROGRAMS) $(SCRIPTS)