]> git.ozlabs.org Git - ccan/commitdiff
Makefile: fix fastcheck.
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 15 Mar 2017 02:54:02 +0000 (13:24 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 15 Mar 2017 02:54:02 +0000 (13:24 +1030)
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 <rusty@rustcorp.com.au>
Makefile
tools/gen_deps.sh

index 7f57869ed2dd7663c073aac3b1fc3c2ba48eff02..90dca604b0f5649756b9de28fd60d9000cb6c603 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -56,7 +56,7 @@ tools/% : tools/%.c $(TOOLS_OBJS)
 # ccanlint
 LINT := tools/ccanlint/ccanlint
 LINT_OPTS.ok := -s
 # 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
 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
 
 # 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)
 
 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)
 
 ifeq ($(strip $(filter clean config.h, $(MAKECMDGOALS))),)
 -include $(DEPS) $(LINT_DEPS) $(TOOLS_DEPS) $(TEST_DEPS)
index 4429afaae907c4d7f9dbf1f000d903b57bc3effd..d20fb8eee72661a85e47d005a1e2423924c1a277 100755 (executable)
@@ -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)"
 # 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)"