Skip to content

Commit

Permalink
Makefile: help people who run 'make check' by mistake
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Nov 11, 2008
1 parent 5bcce84 commit 912f998
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 912f998

Please sign in to comment.