]> git.ipfire.org Git - thirdparty/git.git/blobdiff - Makefile
tmp-objdir: introduce API for temporary object directories
[thirdparty/git.git] / Makefile
index 7a36af86659b549fb32a18c9d364936437fccc9e..4e3becb4980b1d83384eea2c3a67926101e4a044 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -462,6 +462,7 @@ CURL_CONFIG = curl-config
 PTHREAD_LIBS = -lpthread
 PTHREAD_CFLAGS =
 GCOV = gcov
+SPATCH = spatch
 
 export TCL_PATH TCLTK_PATH
 
@@ -697,6 +698,7 @@ LIB_OBJS += abspath.o
 LIB_OBJS += advice.o
 LIB_OBJS += alias.o
 LIB_OBJS += alloc.o
+LIB_OBJS += apply.o
 LIB_OBJS += archive.o
 LIB_OBJS += archive-tar.o
 LIB_OBJS += archive-zip.o
@@ -829,6 +831,7 @@ LIB_OBJS += submodule-config.o
 LIB_OBJS += symlinks.o
 LIB_OBJS += tag.o
 LIB_OBJS += tempfile.o
+LIB_OBJS += tmp-objdir.o
 LIB_OBJS += trace.o
 LIB_OBJS += trailer.o
 LIB_OBJS += transport.o
@@ -2308,6 +2311,18 @@ check: common-cmds.h
                exit 1; \
        fi
 
+C_SOURCES = $(patsubst %.o,%.c,$(C_OBJ))
+%.cocci.patch: %.cocci $(C_SOURCES)
+       @echo '    ' SPATCH $<; \
+       for f in $(C_SOURCES); do \
+               $(SPATCH) --sp-file $< $$f; \
+       done >$@ 2>$@.log; \
+       if test -s $@; \
+       then \
+               echo '    ' SPATCH result: $@; \
+       fi
+coccicheck: $(patsubst %.cocci,%.cocci.patch,$(wildcard contrib/coccinelle/*.cocci))
+
 ### Installation rules
 
 ifneq ($(filter /%,$(firstword $(template_dir))),)
@@ -2499,6 +2514,7 @@ clean: profile-clean coverage-clean
        $(RM) -r $(GIT_TARNAME) .doc-tmp-dir
        $(RM) $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz
        $(RM) $(htmldocs).tar.gz $(manpages).tar.gz
+       $(RM) contrib/coccinelle/*.cocci.patch*
        $(MAKE) -C Documentation/ clean
 ifndef NO_PERL
        $(MAKE) -C gitweb clean