X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2FMakefile;h=e40b59decf9e5e3f5d48f984364ebb76cc2d169b;hb=3460418c419dfcc84316ad65497b0a00950480b9;hp=cd507e5d08d8237ba06b0c138a85c39dd39d25c4;hpb=8f61c0bccb152b2365baf70deac1e59264d7feb7;p=ccan diff --git a/tools/ccanlint/Makefile b/tools/ccanlint/Makefile index cd507e5d..e40b59de 100644 --- a/tools/ccanlint/Makefile +++ b/tools/ccanlint/Makefile @@ -5,15 +5,20 @@ TEST_OBJS := $(TEST_CFILES:.c=.o) CORE_OBJS := tools/ccanlint/ccanlint.o \ tools/ccanlint/file_analysis.o \ tools/doc_extract-core.o \ + tools/depends.o \ ccan/str_talloc/str_talloc.o ccan/grab_file/grab_file.o \ ccan/talloc/talloc.o ccan/noerr/noerr.o OBJS := $(CORE_OBJS) $(TEST_OBJS) -tools/ccanlint/generated-init-tests: $(OBJS) - cat $(OBJS:.o=.c) | sed -n 's/^struct ccanlint \([A-Za-z0-9_]*\) = {/{ extern struct ccanlint \1; list_add(\&tests, \&\1.list); }/p' >$@ +# FIXME: write a trivial C program to do this +tools/ccanlint/generated-init-tests: $(TEST_CFILES) + cat $(TEST_CFILES) | grep ^REGISTER_TEST > $@ -tools/ccanlint/ccanlint.o: tools/ccanlint/generated-init-tests +$(TEST_OBJS): tools/ccanlint/generated-init-tests + +# Otherwise, ccanlint.c et al. may fail to build +$(CORE_OBJS): tools/ccanlint/generated-init-tests tools/ccanlint/ccanlint: $(OBJS)