X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fccanlint%2FMakefile;h=dcbd6f9c19b7a8e947984aff9fada5633c4b824a;hp=16c4bfd2b3324daab2c6462af18341d7528601a8;hb=156dfda864bc2a0fe2ba63f69c22864b2348876f;hpb=11d5072e4fb8c6032ef41a8702f983375398c55e diff --git a/tools/ccanlint/Makefile b/tools/ccanlint/Makefile index 16c4bfd2..dcbd6f9c 100644 --- a/tools/ccanlint/Makefile +++ b/tools/ccanlint/Makefile @@ -1,27 +1,32 @@ -TEST_CFILES := $(wildcard tools/ccanlint/compulsory_tests/*.c) \ - $(wildcard tools/ccanlint/tests/*.c) -TEST_OBJS := $(TEST_CFILES:.c=.o) +COMPULSORY_TEST_CFILES := $(wildcard tools/ccanlint/compulsory_tests/*.c) +NORMAL_TEST_CFILES := $(wildcard tools/ccanlint/tests/*.c) +TEST_OBJS := $(NORMAL_TEST_CFILES:.c=.o) $(COMPULSORY_TEST_CFILES:.c=.o) CORE_OBJS := tools/ccanlint/ccanlint.o \ tools/ccanlint/file_analysis.o \ tools/doc_extract-core.o \ + tools/depends.o \ + tools/tools.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) # FIXME: write a trivial C program to do this -tools/ccanlint/generated-init-tests: $(TEST_CFILES) - cat $(TEST_CFILES) | grep ^REGISTER_TEST > $@ +tools/ccanlint/generated-normal-tests: $(NORMAL_TEST_CFILES) + cat $^ | grep ^REGISTER_TEST > $@ +tools/ccanlint/generated-compulsory-tests: $(COMPULSORY_TEST_CFILES) + cat $^ | grep ^REGISTER_TEST > $@ -$(TEST_OBJS): tools/ccanlint/generated-init-tests +$(TEST_OBJS): tools/ccanlint/generated-normal-tests tools/ccanlint/generated-compulsory-tests # Otherwise, ccanlint.c et al. may fail to build -$(CORE_OBJS): tools/ccanlint/generated-init-tests +$(CORE_OBJS): tools/ccanlint/generated-normal-tests tools/ccanlint/generated-compulsory-tests tools/ccanlint/ccanlint: $(OBJS) ccanlint-clean: - $(RM) tools/ccanlint/generated-init-tests + $(RM) tools/ccanlint/generated-compulsory-tests + $(RM) tools/ccanlint/generated-normal-tests $(RM) tools/ccanlint/ccanlint