-check-%: tools/run_tests
- @echo Testing $*...
- @if tools/run_tests $(V) `[ ! -f ccan/$*.o ] || echo --apiobj=ccan/$*.o` ccan/$* $(filter-out ccan/$*.o, $(filter %.o, $^)) | grep ^'not ok'; then exit 1; else exit 0; fi
+check-%: tools/ccanlint/ccanlint
+ @tools/ccanlint/ccanlint -d ccan/$*
+
+# Doesn't test dependencies, doesn't print verbose fail results.
+summary-check-%: tools/ccanlint/ccanlint $(OBJFILES)
+ @tools/ccanlint/ccanlint -s -d ccan/$*
+
+ccan/%/info: ccan/%/_info
+ $(CC) $(CFLAGS) -o $@ -x c $<