coccicheck: use --all-includes by default

Add a make variable, SPATCH_FLAGS, for specifying flags for spatch, and set it to --all-includes by default. This option lets it consider header files which would otherwise be ignored. That's important for some rules that rely on type information. It doubles the duration of coccicheck, however. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

René Scharfe committed Sep 30, 2016 at 01:21 UTC a9a884aea57b162a3257437b5cbdf8d8037b7c06
1 file changed +2 -1
Makefile
+2 -1
@@ -467,6 +467,7 @@ SPATCH = spatch
467 export TCL_PATH TCLTK_PATH
468
469 SPARSE_FLAGS =
470 +SPATCH_FLAGS = --all-includes
471
472
473
@@ -2314,7 +2315,7 @@ C_SOURCES = $(patsubst %.o,%.c,$(C_OBJ))
2315 %.cocci.patch: %.cocci $(C_SOURCES)
2316 @echo ' ' SPATCH $<; \
2317 for f in $(C_SOURCES); do \
2317 - $(SPATCH) --sp-file $< $$f; \
2318 + $(SPATCH) --sp-file $< $$f $(SPATCH_FLAGS); \
2319 done >$@ 2>$@.log; \
2320 if test -s $@; \
2321 then \