Subject: [PATCH v3 4/6] Makefile: split OBJECTS into OBJECTS and GIT_OBJS

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Tue, 23 Feb 2021 12:41:30 +0100

Add a new GIT_OBJS variable, with the objects sufficient to get to a
git.o or common-main.o.

Signed-off-by: Ævar Arnfjörð Bjarmason <[email-masked]>
---
 Makefile | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 6679153e24e..8b087f68b3f 100644
--- a/Makefile
+++ b/Makefile
@@ -575,6 +575,7 @@ GENERATED_H =
 EXTRA_CPPFLAGS =
 FUZZ_OBJS =
 FUZZ_PROGRAMS =
+GIT_OBJS =
 LIB_OBJS =
 OBJECTS =
 PROGRAM_OBJS =
@@ -2374,10 +2375,12 @@ XDIFF_OBJS += xdiff/xutils.o
 
 TEST_OBJS := $(patsubst %$X,%.o,$(TEST_PROGRAMS)) $(patsubst %,t/helper/%,$(TEST_BUILTINS_OBJS))
 
-OBJECTS += $(LIB_OBJS)
-OBJECTS += $(BUILTIN_OBJS)
-OBJECTS += common-main.o
-OBJECTS += git.o
+GIT_OBJS += $(LIB_OBJS)
+GIT_OBJS += $(BUILTIN_OBJS)
+GIT_OBJS += common-main.o
+GIT_OBJS += git.o
+
+OBJECTS += $(GIT_OBJS)
 OBJECTS += $(PROGRAM_OBJS)
 OBJECTS += $(TEST_OBJS)
 OBJECTS += $(XDIFF_OBJS)
-- 
2.30.0.284.gd98b1dd5eaa7