mirror of
https://github.com/git/git.git
synced 2024-05-25 21:46:10 +02:00
Merge branch 'ab/make-cleanup' into next
Reorganize Makefile to allow building git.o and other essential objects without extra stuff needed only for testing. * ab/make-cleanup: Makefile: add {program,xdiff,test,git,fuzz}-objs & objects targets Makefile: split OBJECTS into OBJECTS and GIT_OBJS Makefile: sort OBJECTS assignment for subsequent change Makefile: split up long OBJECTS line Makefile: guard against TEST_OBJS in the environment
This commit is contained in:
commit
e9e16c9fc4
31
Makefile
31
Makefile
|
@ -578,7 +578,9 @@ GENERATED_H =
|
||||||
EXTRA_CPPFLAGS =
|
EXTRA_CPPFLAGS =
|
||||||
FUZZ_OBJS =
|
FUZZ_OBJS =
|
||||||
FUZZ_PROGRAMS =
|
FUZZ_PROGRAMS =
|
||||||
|
GIT_OBJS =
|
||||||
LIB_OBJS =
|
LIB_OBJS =
|
||||||
|
OBJECTS =
|
||||||
PROGRAM_OBJS =
|
PROGRAM_OBJS =
|
||||||
PROGRAMS =
|
PROGRAMS =
|
||||||
EXCLUDED_PROGRAMS =
|
EXCLUDED_PROGRAMS =
|
||||||
|
@ -587,6 +589,7 @@ SCRIPT_PYTHON =
|
||||||
SCRIPT_SH =
|
SCRIPT_SH =
|
||||||
SCRIPT_LIB =
|
SCRIPT_LIB =
|
||||||
TEST_BUILTINS_OBJS =
|
TEST_BUILTINS_OBJS =
|
||||||
|
TEST_OBJS =
|
||||||
TEST_PROGRAMS_NEED_X =
|
TEST_PROGRAMS_NEED_X =
|
||||||
THIRD_PARTY_SOURCES =
|
THIRD_PARTY_SOURCES =
|
||||||
|
|
||||||
|
@ -662,6 +665,8 @@ ETAGS_TARGET = TAGS
|
||||||
FUZZ_OBJS += fuzz-commit-graph.o
|
FUZZ_OBJS += fuzz-commit-graph.o
|
||||||
FUZZ_OBJS += fuzz-pack-headers.o
|
FUZZ_OBJS += fuzz-pack-headers.o
|
||||||
FUZZ_OBJS += fuzz-pack-idx.o
|
FUZZ_OBJS += fuzz-pack-idx.o
|
||||||
|
.PHONY: fuzz-objs
|
||||||
|
fuzz-objs: $(FUZZ_OBJS)
|
||||||
|
|
||||||
# Always build fuzz objects even if not testing, to prevent bit-rot.
|
# Always build fuzz objects even if not testing, to prevent bit-rot.
|
||||||
all:: $(FUZZ_OBJS)
|
all:: $(FUZZ_OBJS)
|
||||||
|
@ -679,6 +684,8 @@ PROGRAM_OBJS += http-backend.o
|
||||||
PROGRAM_OBJS += imap-send.o
|
PROGRAM_OBJS += imap-send.o
|
||||||
PROGRAM_OBJS += sh-i18n--envsubst.o
|
PROGRAM_OBJS += sh-i18n--envsubst.o
|
||||||
PROGRAM_OBJS += shell.o
|
PROGRAM_OBJS += shell.o
|
||||||
|
.PHONY: program-objs
|
||||||
|
program-objs: $(PROGRAM_OBJS)
|
||||||
|
|
||||||
# Binary suffix, set to .exe for Windows builds
|
# Binary suffix, set to .exe for Windows builds
|
||||||
X =
|
X =
|
||||||
|
@ -2378,16 +2385,30 @@ XDIFF_OBJS += xdiff/xmerge.o
|
||||||
XDIFF_OBJS += xdiff/xpatience.o
|
XDIFF_OBJS += xdiff/xpatience.o
|
||||||
XDIFF_OBJS += xdiff/xprepare.o
|
XDIFF_OBJS += xdiff/xprepare.o
|
||||||
XDIFF_OBJS += xdiff/xutils.o
|
XDIFF_OBJS += xdiff/xutils.o
|
||||||
|
.PHONY: xdiff-objs
|
||||||
|
xdiff-objs: $(XDIFF_OBJS)
|
||||||
|
|
||||||
TEST_OBJS := $(patsubst %$X,%.o,$(TEST_PROGRAMS)) $(patsubst %,t/helper/%,$(TEST_BUILTINS_OBJS))
|
TEST_OBJS := $(patsubst %$X,%.o,$(TEST_PROGRAMS)) $(patsubst %,t/helper/%,$(TEST_BUILTINS_OBJS))
|
||||||
OBJECTS := $(LIB_OBJS) $(BUILTIN_OBJS) $(PROGRAM_OBJS) $(TEST_OBJS) \
|
.PHONY: test-objs
|
||||||
$(XDIFF_OBJS) \
|
test-objs: $(TEST_OBJS)
|
||||||
$(FUZZ_OBJS) \
|
|
||||||
common-main.o \
|
GIT_OBJS += $(LIB_OBJS)
|
||||||
git.o
|
GIT_OBJS += $(BUILTIN_OBJS)
|
||||||
|
GIT_OBJS += common-main.o
|
||||||
|
GIT_OBJS += git.o
|
||||||
|
.PHONY: git-objs
|
||||||
|
git-objs: $(GIT_OBJS)
|
||||||
|
|
||||||
|
OBJECTS += $(GIT_OBJS)
|
||||||
|
OBJECTS += $(PROGRAM_OBJS)
|
||||||
|
OBJECTS += $(TEST_OBJS)
|
||||||
|
OBJECTS += $(XDIFF_OBJS)
|
||||||
|
OBJECTS += $(FUZZ_OBJS)
|
||||||
ifndef NO_CURL
|
ifndef NO_CURL
|
||||||
OBJECTS += http.o http-walker.o remote-curl.o
|
OBJECTS += http.o http-walker.o remote-curl.o
|
||||||
endif
|
endif
|
||||||
|
.PHONY: objects
|
||||||
|
objects: $(OBJECTS)
|
||||||
|
|
||||||
dep_files := $(foreach f,$(OBJECTS),$(dir $f).depend/$(notdir $f).d)
|
dep_files := $(foreach f,$(OBJECTS),$(dir $f).depend/$(notdir $f).d)
|
||||||
dep_dirs := $(addsuffix .depend,$(sort $(dir $(OBJECTS))))
|
dep_dirs := $(addsuffix .depend,$(sort $(dir $(OBJECTS))))
|
||||||
|
|
Loading…
Reference in New Issue