From: Patrick Steinhardt Date: Wed, 4 Sep 2024 14:17:09 +0000 (+0200) Subject: Makefile: do not use sparse on third-party sources X-Git-Tag: v2.47.0-rc0~32^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=416f4585d6f6e991a929a9d0b8b987a8815c77b8;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- diff --git a/Makefile b/Makefile index 8c4487dd0c..81a47b6132 100644 --- a/Makefile +++ b/Makefile @@ -3252,7 +3252,8 @@ t/helper/test-%$X: t/helper/test-%.o GIT-LDFLAGS $(GITLIBS) $(REFTABLE_TEST_LIB) check-sha1:: t/helper/test-tool$X t/helper/test-sha1.sh -SP_OBJ = $(patsubst %.o,%.sp,$(OBJECTS)) +SP_SRC = $(filter-out $(THIRD_PARTY_SOURCES),$(patsubst %.o,%.c,$(OBJECTS))) +SP_OBJ = $(patsubst %.c,%.sp,$(SP_SRC)) $(SP_OBJ): %.sp: %.c %.o $(GENERATED_H) $(QUIET_SP)cgcc -no-compile $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) \