From: Rusty Russell Date: Wed, 15 Mar 2017 02:54:02 +0000 (+1030) Subject: Makefile: fix fastcheck. X-Git-Url: http://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=0ea6a2126c713207cb139d3329b15f0c9d735fbe Makefile: fix fastcheck. commit 25b7406d11ea3703be864097af66ce95611dde72 tried to make the tests depend on the info file, but that broke .fast.ok, which used the same pattern: %.ok: $(LINT) %info This is what happens when you're too tricky! Simply duplicate the rule, and change .fast.ok to .fast-ok so it doesn't match both. Signed-off-by: Rusty Russell --- diff --git a/Makefile b/Makefile index 7f57869e..90dca604 100644 --- a/Makefile +++ b/Makefile @@ -56,7 +56,7 @@ tools/% : tools/%.c $(TOOLS_OBJS) # ccanlint LINT := tools/ccanlint/ccanlint LINT_OPTS.ok := -s -LINT_OPTS.fast.ok := -s -x tests_pass_valgrind -x tests_compile_coverage +LINT_OPTS.fast-ok := -s -x tests_pass_valgrind -x tests_compile_coverage LINT_SRCS := $(filter-out $(LINT).c, $(wildcard tools/ccanlint/*.c tools/ccanlint/tests/*.c)) LINT_DEPS := $(LINT_SRCS:%.c=%.d) $(LINT).d LINT_CCAN_MODULES := asort autodata dgraph ilog lbalance ptr_valid strmap @@ -75,10 +75,13 @@ TEST_DEPS := $(MODULES:%=%/.d) # We produce .ok files when the tests succeed %.ok: $(LINT) %info - $(PRE)$(LINT) $(LINT_OPTS$(notdir $@)) --deps-fail-ignore $(LINT_GCOV) $(LINTFLAGS) $(dir $*) && touch $@ + $(PRE)$(LINT) $(LINT_OPTS.ok) --deps-fail-ignore $(LINT_GCOV) $(LINTFLAGS) $(dir $*) && touch $@ + +%.fast-ok: $(LINT) %info + $(PRE)$(LINT) $(LINT_OPTS.fast-ok) --deps-fail-ignore $(LINT_GCOV) $(LINTFLAGS) $(dir $*) && touch $@ check: $(MODULES:%=%/.ok) -fastcheck: $(MODULES:%=%/.fast.ok) +fastcheck: $(MODULES:%=%/.fast-ok) ifeq ($(strip $(filter clean config.h, $(MAKECMDGOALS))),) -include $(DEPS) $(LINT_DEPS) $(TOOLS_DEPS) $(TEST_DEPS) diff --git a/tools/gen_deps.sh b/tools/gen_deps.sh index 4429afaa..d20fb8ee 100755 --- a/tools/gen_deps.sh +++ b/tools/gen_deps.sh @@ -20,4 +20,4 @@ deps=$(echo `$path/info depends` | tr ' ' '\n' | \ # Print the test targets and target aliases echo "${module}_ok_deps := $test_srcs $module_objs $deps" echo "$path/.ok: \$(${module}_ok_deps)" -echo "$path/.fast.ok: \$(${module}_ok_deps:%.ok=%.fast.ok)" +echo "$path/.fast-ok: \$(${module}_ok_deps:%.ok=%.fast-ok)"