Makefile: do not use sparse on third-party sources
We have several third-party sources in our codebase that we have imported from upstream projects. These sources are mostly excluded from our static analysis, for example when running Coccinelle. Do the same for our "sparse" target by filtering them out. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Patrick Steinhardt committed
Sep 4, 2024 at 16:17 UTC
416f4585d6f6e991a929a9d0b8b987a8815c77b8
1 file changed
+2
-1
Makefile
+2
-1
@@ -3252,7 +3252,8 @@ t/helper/test-%$X: t/helper/test-%.o GIT-LDFLAGS $(GITLIBS) $(REFTABLE_TEST_LIB)
3252
check-sha1:: t/helper/test-tool$X
3253
t/helper/test-sha1.sh
3254
3255
-SP_OBJ = $(patsubst %.o,%.sp,$(OBJECTS))
3255
+SP_SRC = $(filter-out $(THIRD_PARTY_SOURCES),$(patsubst %.o,%.c,$(OBJECTS)))
3256
+SP_OBJ = $(patsubst %.c,%.sp,$(SP_SRC))
3257
3258
$(SP_OBJ): %.sp: %.c %.o $(GENERATED_H)
3259
$(QUIET_SP)cgcc -no-compile $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) \