From: Junio C Hamano Date: Wed, 13 Oct 2021 22:15:58 +0000 (-0700) Subject: Merge branch 'ab/make-sparse-for-real' X-Git-Tag: v2.34.0-rc0~57 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f0beebdb7b068f7698d5854b770cd3407059e097;p=thirdparty%2Fgit.git Merge branch 'ab/make-sparse-for-real' Prevent "make sparse" from running for the source files that haven't been modified. * ab/make-sparse-for-real: Makefile: make the "sparse" target non-.PHONY --- f0beebdb7b068f7698d5854b770cd3407059e097 diff --cc Makefile index 877492386e,8d085ab72a..060a8c4647 --- a/Makefile +++ b/Makefile @@@ -2903,14 -2903,16 +2903,16 @@@ check-sha1:: t/helper/test-tool$ SP_OBJ = $(patsubst %.o,%.sp,$(C_OBJ)) - $(SP_OBJ): %.sp: %.c GIT-CFLAGS FORCE + $(SP_OBJ): %.sp: %.c %.o GIT-CFLAGS $(QUIET_SP)cgcc -no-compile $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) \ - $(SPARSE_FLAGS) $(SP_EXTRA_FLAGS) $< + -Wsparse-error \ + $(SPARSE_FLAGS) $(SP_EXTRA_FLAGS) $< && \ + >$@ - .PHONY: sparse $(SP_OBJ) + .PHONY: sparse sparse: $(SP_OBJ) -EXCEPT_HDRS := command-list.h config-list.h unicode-width.h compat/% xdiff/% +EXCEPT_HDRS := $(GENERATED_H) unicode-width.h compat/% xdiff/% ifndef GCRYPT_SHA256 EXCEPT_HDRS += sha256/gcrypt.h endif