[PATCH v5 6/9] Makefile: do not use sparse on third-party sources
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Aug 16, 2024, 07:04 UTC
- Message-ID
- <88ea94ce16c365f4b6b634a274632db134c9eba1.1723791831.git.ps@pks.im>
- In-Reply-To
- <cover.1723791831.git.ps@pks.im>
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> --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile index 5384bf8104..377ea7e144 100644 --- a/Makefile +++ b/Makefile @@ -3251,7 +3251,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) \
-- 2.46.0.46.g406f326d27.dirty