Skip to content

Commit b75f270

Browse files
avarttaylorr
authored andcommitted
cocci: split off include-less "tests" from SPATCH_FLAGS
Amend the "coccicheck-test" rule added in f7ff659 (cocci: add a "coccicheck-test" target and test *.cocci rules, 2022-07-05) to stop using "--all-includes". The flags we'll need for the tests are different than the ones we'll need for our main source code. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Taylor Blau <[email protected]>
1 parent 49f54c4 commit b75f270

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1296,6 +1296,7 @@ SANITIZE_ADDRESS =
12961296

12971297
# For the 'coccicheck' target
12981298
SPATCH_FLAGS = --all-includes
1299+
SPATCH_TEST_FLAGS =
12991300
# Setting SPATCH_BATCH_SIZE higher will
13001301
# usually result in less CPU usage at the cost of higher peak memory.
13011302
# Setting it to 0 will feed all files in a single spatch invocation.
@@ -1305,6 +1306,7 @@ SPATCH_BATCH_SIZE = 1
13051306
TRACK_SPATCH_DEFINES =
13061307
TRACK_SPATCH_DEFINES += $(SPATCH)
13071308
TRACK_SPATCH_DEFINES += $(SPATCH_FLAGS)
1309+
TRACK_SPATCH_DEFINES += $(SPATCH_TEST_FLAGS)
13081310
TRACK_SPATCH_DEFINES += $(SPATCH_BATCH_SIZE)
13091311
GIT-SPATCH-DEFINES: FORCE
13101312
@FLAGS='$(TRACK_SPATCH_DEFINES)'; \
@@ -3193,7 +3195,7 @@ $(COCCI_TEST_RES_GEN): .build/%.res : %.c
31933195
$(COCCI_TEST_RES_GEN): .build/%.res : %.res
31943196
$(COCCI_TEST_RES_GEN): .build/contrib/coccinelle/tests/%.res : contrib/coccinelle/%.cocci
31953197
$(call mkdir_p_parent_template)
3196-
$(QUIET_SPATCH_TEST)$(SPATCH) $(SPATCH_FLAGS) \
3198+
$(QUIET_SPATCH_TEST)$(SPATCH) $(SPATCH_TEST_FLAGS) \
31973199
--very-quiet --no-show-diff \
31983200
--sp-file $< -o $@ \
31993201
$(@:.build/%.res=%.c) && \

0 commit comments

Comments
 (0)