]> git.ipfire.org Git - thirdparty/git.git/blobdiff - Makefile
grep tests: move binary pattern tests into their own file
[thirdparty/git.git] / Makefile
index 9370d85ff312e247301110049408393748bcc1b5..f58bf14c7bf3d9b29fcd0a97bc14e253f3eb675d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -265,10 +265,6 @@ all::
 #
 # Define NO_DEFLATE_BOUND if your zlib does not have deflateBound.
 #
-# Define NO_R_TO_GCC_LINKER if your gcc does not like "-R/path/lib"
-# that tells runtime paths to dynamic libraries;
-# "-Wl,-rpath=/path/lib" is used instead.
-#
 # Define NO_NORETURN if using buggy versions of gcc 4.6+ and profile feedback,
 # as the compiler can crash (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49299)
 #
@@ -624,7 +620,6 @@ SCRIPT_SH += git-web--browse.sh
 
 SCRIPT_LIB += git-mergetool--lib
 SCRIPT_LIB += git-parse-remote
-SCRIPT_LIB += git-rebase--common
 SCRIPT_LIB += git-rebase--preserve-merges
 SCRIPT_LIB += git-sh-setup
 SCRIPT_LIB += git-sh-i18n
@@ -1159,6 +1154,7 @@ endif
 # which'll override these defaults.
 CFLAGS = -g -O2 -Wall
 LDFLAGS =
+CC_LD_DYNPATH = -Wl,-rpath,
 BASIC_CFLAGS = -I.
 BASIC_LDFLAGS =
 
@@ -1170,8 +1166,11 @@ PTHREAD_CFLAGS =
 SPARSE_FLAGS ?=
 SP_EXTRA_FLAGS =
 
-# For the 'coccicheck' target
+# For the 'coccicheck' target; setting SPATCH_BATCH_SIZE higher will
+# usually result in less CPU usage at the cost of higher peak memory.
+# Setting it to 0 will feed all files in a single spatch invocation.
 SPATCH_FLAGS = --all-includes --patch .
+SPATCH_BATCH_SIZE = 1
 
 include config.mak.uname
 -include config.mak.autogen
@@ -1286,16 +1285,6 @@ ifeq ($(uname_S),Darwin)
        PTHREAD_LIBS =
 endif
 
-ifndef CC_LD_DYNPATH
-       ifdef NO_R_TO_GCC_LINKER
-               # Some gcc does not accept and pass -R to the linker to specify
-               # the runtime dynamic library path.
-               CC_LD_DYNPATH = -Wl,-rpath,
-       else
-               CC_LD_DYNPATH = -R
-       endif
-endif
-
 ifdef NO_LIBGEN_H
        COMPAT_CFLAGS += -DNO_LIBGEN_H
        COMPAT_OBJS += compat/basename.o
@@ -2806,12 +2795,14 @@ endif
 
 %.cocci.patch: %.cocci $(COCCI_SOURCES)
        @echo '    ' SPATCH $<; \
-       ret=0; \
-       for f in $(COCCI_SOURCES); do \
-               $(SPATCH) --sp-file $< $$f $(SPATCH_FLAGS) || \
-                       { ret=$$?; break; }; \
-       done >$@+ 2>$@.log; \
-       if test $$ret != 0; \
+       if test $(SPATCH_BATCH_SIZE) = 0; then \
+               limit=; \
+       else \
+               limit='-n $(SPATCH_BATCH_SIZE)'; \
+       fi; \
+       if ! echo $(COCCI_SOURCES) | xargs $$limit \
+               $(SPATCH) --sp-file $< $(SPATCH_FLAGS) \
+               >$@+ 2>$@.log; \
        then \
                cat $@.log; \
                exit 1; \