Skip to content

Commit 416f458

Browse files
pks-tgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9ec76ad commit 416f458

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3252,7 +3252,8 @@ t/helper/test-%$X: t/helper/test-%.o GIT-LDFLAGS $(GITLIBS) $(REFTABLE_TEST_LIB)
32523252
check-sha1:: t/helper/test-tool$X
32533253
t/helper/test-sha1.sh
32543254

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))
32563257

32573258
$(SP_OBJ): %.sp: %.c %.o $(GENERATED_H)
32583259
$(QUIET_SP)cgcc -no-compile $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) \

0 commit comments

Comments
 (0)