]> git.ozlabs.org Git - ccan/blob - ccan_tools/ccanlint/Makefile
ddc5534bb36b19e6f458d9f3d9e8b0330ae92048
[ccan] / ccan_tools / ccanlint / Makefile
1 OBJS := ccan_tools/ccanlint/no_info.o \
2         ccan_tools/ccanlint/has_main_header.o \
3         ccan_tools/ccanlint/has_tests.o \
4         ccan_tools/ccanlint/trailing_whitespace.o \
5         ccan_tools/ccanlint/idempotent.o \
6
7 FUTURE:=ccan_tools/ccanlint/if_have_not_ifdef.o \
8         ccan_tools/ccanlint/needs_depends.o \
9         ccan_tools/ccanlint/has_info_documentation.o \
10         ccan_tools/ccanlint/has_header_documentation.o \
11         ccan_tools/ccanlint/has_tests.o \
12         ccan_tools/ccanlint/builds_ok.o \
13         ccan_tools/ccanlint/builds_ok_all_have_variants.o \
14         ccan_tools/ccanlint/run_tests.o \
15         ccan_tools/ccanlint/test_coverage.o \
16
17 ccan_tools/ccanlint/generated-init-tests: $(OBJS)
18         cat $(OBJS:.o=.c) | sed -n 's/^struct ccanlint \([A-Za-z0-9_]*\) = {/{ extern struct ccanlint \1; list_add(\&tests, \&\1.list); }/p' >$@
19
20 ccan_tools/ccanlint/ccanlint.o: ccan_tools/ccanlint/generated-init-tests
21
22 ccan_tools/ccanlint/ccanlint: \
23         $(OBJS)                 \
24         ccan_tools/ccanlint/ccanlint.o \
25         ccan_tools/ccanlint/get_file_lines.o \
26         ccan_tools/ccanlint/file_analysis.o \
27         talloc/talloc.o noerr/noerr.o
28
29 ccanlint-clean:
30         $(RM) ccan_tools/ccanlint/generated-init-tests
31