1 TEST_CFILES := $(wildcard tools/ccanlint/tests/*.c)
2 TEST_OBJS := $(TEST_CFILES:.c=.o)
7 ccan/foreach/foreach.o \
8 ccan/grab_file/grab_file.o \
10 ccan/htable/htable.o \
11 ccan/lbalance/lbalance.o \
17 ccan/read_write_all/read_write_all.o \
18 ccan/str/str.o ccan/str/debug.o \
19 ccan/str_talloc/str_talloc.o \
20 ccan/talloc/talloc.o \
21 ccan/talloc_link/talloc_link.o \
23 tools/ccanlint/async.o \
24 tools/ccanlint/ccanlint.o \
25 tools/ccanlint/file_analysis.o \
26 tools/ccanlint/licenses.o \
29 tools/doc_extract-core.o \
32 OBJS := $(CORE_OBJS) $(TEST_OBJS)
34 # FIXME: write a trivial C program to do this
35 tools/ccanlint/generated-testlist: $(TEST_CFILES)
36 cat $^ | grep ^REGISTER_TEST > $@
38 $(TEST_OBJS): tools/ccanlint/generated-testlist
40 # Otherwise, ccanlint.c et al. may fail to build
41 $(CORE_OBJS): tools/ccanlint/generated-testlist config.h
43 tools/ccanlint/ccanlint: $(OBJS)
46 $(RM) tools/ccanlint/generated-testlist
47 $(RM) tools/ccanlint/ccanlint