]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ab/make-sparse-for-real'
authorJunio C Hamano <gitster@pobox.com>
Wed, 13 Oct 2021 22:15:58 +0000 (15:15 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 Oct 2021 22:15:58 +0000 (15:15 -0700)
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

1  2 
.gitignore
Makefile

diff --cc .gitignore
Simple merge
diff --cc Makefile
index 877492386ee7b9d14ccb4ef7b746f77e81af5b86,8d085ab72a1363aadd1713141a440db6f8defa91..060a8c464758b06155c569379dadd84df3d36144
+++ 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