summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/Makefile6
-rw-r--r--Makefile13
-rw-r--r--contrib/scalar/Makefile3
-rw-r--r--contrib/scalar/t/Makefile3
-rw-r--r--shared.mak9
-rw-r--r--t/Makefile3
-rw-r--r--t/interop/Makefile3
-rw-r--r--t/perf/Makefile3
-rw-r--r--templates/Makefile3
9 files changed, 33 insertions, 13 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile
index ed656db2ae..ba27456c86 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -1,3 +1,6 @@
+# Import tree-wide shared Makefile behavior and libraries
+include ../shared.mak
+
# Guard against environment variables
MAN1_TXT =
MAN5_TXT =
@@ -524,7 +527,4 @@ doc-l10n install-l10n::
$(MAKE) -C po $@
endif
-# Delete the target file on error
-.DELETE_ON_ERROR:
-
.PHONY: FORCE
diff --git a/Makefile b/Makefile
index 6f0b4b775f..aa5ff001b6 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,9 @@
# The default target of this Makefile is...
all::
+# Import tree-wide shared Makefile behavior and libraries
+include shared.mak
+
# Define V=1 to have a more verbose compile.
#
# Define SHELL_PATH to a POSIX shell if your /bin/sh is broken.
@@ -2194,16 +2197,6 @@ shell_compatibility_test: please_set_SHELL_PATH_to_a_more_modern_shell
strip: $(PROGRAMS) git$X
$(STRIP) $(STRIP_OPTS) $^
-### Flags affecting all rules
-
-# A GNU make extension since gmake 3.72 (released in late 1994) to
-# remove the target of rules if commands in those rules fail. The
-# default is to only do that if make itself receives a signal. Affects
-# all targets, see:
-#
-# info make --index-search=.DELETE_ON_ERROR
-.DELETE_ON_ERROR:
-
### Target-specific flags and dependencies
# The generic compilation pattern rule and automatically
diff --git a/contrib/scalar/Makefile b/contrib/scalar/Makefile
index 1e9b969f3d..d585b319ed 100644
--- a/contrib/scalar/Makefile
+++ b/contrib/scalar/Makefile
@@ -1,6 +1,9 @@
# The default target of this Makefile is...
all::
+# Import tree-wide shared Makefile behavior and libraries
+include ../../shared.mak
+
include ../../config.mak.uname
-include ../../config.mak.autogen
-include ../../config.mak
diff --git a/contrib/scalar/t/Makefile b/contrib/scalar/t/Makefile
index 6170672bb3..01e82e56d1 100644
--- a/contrib/scalar/t/Makefile
+++ b/contrib/scalar/t/Makefile
@@ -1,3 +1,6 @@
+# Import tree-wide shared Makefile behavior and libraries
+include ../../../shared.mak
+
# Run scalar tests
#
# Copyright (c) 2005,2021 Junio C Hamano, Johannes Schindelin
diff --git a/shared.mak b/shared.mak
new file mode 100644
index 0000000000..0170bb397a
--- /dev/null
+++ b/shared.mak
@@ -0,0 +1,9 @@
+### Flags affecting all rules
+
+# A GNU make extension since gmake 3.72 (released in late 1994) to
+# remove the target of rules if commands in those rules fail. The
+# default is to only do that if make itself receives a signal. Affects
+# all targets, see:
+#
+# info make --index-search=.DELETE_ON_ERROR
+.DELETE_ON_ERROR:
diff --git a/t/Makefile b/t/Makefile
index 46cd5fc527..056ce55dcc 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -1,3 +1,6 @@
+# Import tree-wide shared Makefile behavior and libraries
+include ../shared.mak
+
# Run tests
#
# Copyright (c) 2005 Junio C Hamano
diff --git a/t/interop/Makefile b/t/interop/Makefile
index 31a4bbc716..6911c2915a 100644
--- a/t/interop/Makefile
+++ b/t/interop/Makefile
@@ -1,3 +1,6 @@
+# Import tree-wide shared Makefile behavior and libraries
+include ../../shared.mak
+
-include ../../config.mak
export GIT_TEST_OPTIONS
diff --git a/t/perf/Makefile b/t/perf/Makefile
index 2465770a78..e4808aebed 100644
--- a/t/perf/Makefile
+++ b/t/perf/Makefile
@@ -1,3 +1,6 @@
+# Import tree-wide shared Makefile behavior and libraries
+include ../../shared.mak
+
-include ../../config.mak
export GIT_TEST_OPTIONS
diff --git a/templates/Makefile b/templates/Makefile
index d22a71a399..636cee52f5 100644
--- a/templates/Makefile
+++ b/templates/Makefile
@@ -1,3 +1,6 @@
+# Import tree-wide shared Makefile behavior and libraries
+include ../shared.mak
+
# make and install sample templates
ifndef V