summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-10-13 22:15:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-10-13 22:15:58 (GMT)
commitf0beebdb7b068f7698d5854b770cd3407059e097 (patch)
treebc4d1bed0dd924e723b9ee2c72f45b77e05bf1f9 /Makefile
parentd7bc8521518d4821c5d2e18742991a6ad05efee1 (diff)
parentc234e8a0ecfaa53f88b228e50fafe849402f6c49 (diff)
downloadgit-f0beebdb7b068f7698d5854b770cd3407059e097.zip
git-f0beebdb7b068f7698d5854b770cd3407059e097.tar.gz
git-f0beebdb7b068f7698d5854b770cd3407059e097.tar.bz2
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
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 8774923..060a8c4 100644
--- a/Makefile
+++ b/Makefile
@@ -2903,11 +2903,13 @@ check-sha1:: t/helper/test-tool$X
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 := $(GENERATED_H) unicode-width.h compat/% xdiff/%
@@ -3235,6 +3237,7 @@ clean: profile-clean coverage-clean cocciclean
$(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git$X
$(RM) $(TEST_PROGRAMS)
$(RM) $(FUZZ_PROGRAMS)
+ $(RM) $(SP_OBJ)
$(RM) $(HCC)
$(RM) -r bin-wrappers $(dep_dirs) $(compdb_dir) compile_commands.json
$(RM) -r po/build/