Commit 0ea6a212 authored by Rusty Russell's avatar Rusty Russell

Makefile: fix fastcheck.

commit 25b7406d 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: 's avatarRusty Russell <rusty@rustcorp.com.au>
parent a9f9eb88
......@@ -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)
......
......@@ -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)"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment