Merge branch 'en/make-libgit-a'
Instead of three library archives (one for git, one for reftable, and one for xdiff), roll everything into a single libgit.a archive. This would help later effort to FFI into Rust. * en/make-libgit-a: make: delete REFTABLE_LIB, add reftable to LIB_OBJS make: delete XDIFF_LIB, add xdiff to LIB_OBJSmain
commit
282a9684ab
64
Makefile
64
Makefile
|
|
@ -927,16 +927,13 @@ export PYTHON_PATH
|
|||
TEST_SHELL_PATH = $(SHELL_PATH)
|
||||
|
||||
LIB_FILE = libgit.a
|
||||
XDIFF_LIB = xdiff/lib.a
|
||||
REFTABLE_LIB = reftable/libreftable.a
|
||||
ifdef DEBUG
|
||||
RUST_LIB = target/debug/libgitcore.a
|
||||
else
|
||||
RUST_LIB = target/release/libgitcore.a
|
||||
endif
|
||||
|
||||
# xdiff and reftable libs may in turn depend on what is in libgit.a
|
||||
GITLIBS = common-main.o $(LIB_FILE) $(XDIFF_LIB) $(REFTABLE_LIB) $(LIB_FILE)
|
||||
GITLIBS = common-main.o $(LIB_FILE)
|
||||
EXTLIBS =
|
||||
|
||||
GIT_USER_AGENT = git/$(GIT_VERSION)
|
||||
|
|
@ -1248,6 +1245,20 @@ LIB_OBJS += refs/iterator.o
|
|||
LIB_OBJS += refs/packed-backend.o
|
||||
LIB_OBJS += refs/ref-cache.o
|
||||
LIB_OBJS += refspec.o
|
||||
LIB_OBJS += reftable/basics.o
|
||||
LIB_OBJS += reftable/block.o
|
||||
LIB_OBJS += reftable/blocksource.o
|
||||
LIB_OBJS += reftable/error.o
|
||||
LIB_OBJS += reftable/fsck.o
|
||||
LIB_OBJS += reftable/iter.o
|
||||
LIB_OBJS += reftable/merged.o
|
||||
LIB_OBJS += reftable/pq.o
|
||||
LIB_OBJS += reftable/record.o
|
||||
LIB_OBJS += reftable/stack.o
|
||||
LIB_OBJS += reftable/system.o
|
||||
LIB_OBJS += reftable/table.o
|
||||
LIB_OBJS += reftable/tree.o
|
||||
LIB_OBJS += reftable/writer.o
|
||||
LIB_OBJS += remote.o
|
||||
LIB_OBJS += replace-object.o
|
||||
LIB_OBJS += repo-settings.o
|
||||
|
|
@ -1322,6 +1333,13 @@ LIB_OBJS += write-or-die.o
|
|||
LIB_OBJS += ws.o
|
||||
LIB_OBJS += wt-status.o
|
||||
LIB_OBJS += xdiff-interface.o
|
||||
LIB_OBJS += xdiff/xdiffi.o
|
||||
LIB_OBJS += xdiff/xemit.o
|
||||
LIB_OBJS += xdiff/xhistogram.o
|
||||
LIB_OBJS += xdiff/xmerge.o
|
||||
LIB_OBJS += xdiff/xpatience.o
|
||||
LIB_OBJS += xdiff/xprepare.o
|
||||
LIB_OBJS += xdiff/xutils.o
|
||||
|
||||
BUILTIN_OBJS += builtin/add.o
|
||||
BUILTIN_OBJS += builtin/am.o
|
||||
|
|
@ -2756,31 +2774,6 @@ reconfigure config.mak.autogen: config.status
|
|||
.PHONY: reconfigure # This is a convenience target.
|
||||
endif
|
||||
|
||||
XDIFF_OBJS += xdiff/xdiffi.o
|
||||
XDIFF_OBJS += xdiff/xemit.o
|
||||
XDIFF_OBJS += xdiff/xhistogram.o
|
||||
XDIFF_OBJS += xdiff/xmerge.o
|
||||
XDIFF_OBJS += xdiff/xpatience.o
|
||||
XDIFF_OBJS += xdiff/xprepare.o
|
||||
XDIFF_OBJS += xdiff/xutils.o
|
||||
.PHONY: xdiff-objs
|
||||
xdiff-objs: $(XDIFF_OBJS)
|
||||
|
||||
REFTABLE_OBJS += reftable/basics.o
|
||||
REFTABLE_OBJS += reftable/block.o
|
||||
REFTABLE_OBJS += reftable/blocksource.o
|
||||
REFTABLE_OBJS += reftable/error.o
|
||||
REFTABLE_OBJS += reftable/fsck.o
|
||||
REFTABLE_OBJS += reftable/iter.o
|
||||
REFTABLE_OBJS += reftable/merged.o
|
||||
REFTABLE_OBJS += reftable/pq.o
|
||||
REFTABLE_OBJS += reftable/record.o
|
||||
REFTABLE_OBJS += reftable/stack.o
|
||||
REFTABLE_OBJS += reftable/system.o
|
||||
REFTABLE_OBJS += reftable/table.o
|
||||
REFTABLE_OBJS += reftable/tree.o
|
||||
REFTABLE_OBJS += reftable/writer.o
|
||||
|
||||
TEST_OBJS := $(patsubst %$X,%.o,$(TEST_PROGRAMS)) $(patsubst %,t/helper/%,$(TEST_BUILTINS_OBJS))
|
||||
|
||||
.PHONY: test-objs
|
||||
|
|
@ -2801,9 +2794,8 @@ OBJECTS += $(GIT_OBJS)
|
|||
OBJECTS += $(SCALAR_OBJS)
|
||||
OBJECTS += $(PROGRAM_OBJS)
|
||||
OBJECTS += $(TEST_OBJS)
|
||||
OBJECTS += $(XDIFF_OBJS)
|
||||
OBJECTS += $(FUZZ_OBJS)
|
||||
OBJECTS += $(REFTABLE_OBJS) $(REFTABLE_TEST_OBJS)
|
||||
OBJECTS += $(REFTABLE_TEST_OBJS)
|
||||
OBJECTS += $(UNIT_TEST_OBJS)
|
||||
OBJECTS += $(CLAR_TEST_OBJS)
|
||||
OBJECTS += $(patsubst %,$(UNIT_TEST_DIR)/%.o,$(UNIT_TEST_PROGRAMS))
|
||||
|
|
@ -2961,12 +2953,6 @@ $(RUST_LIB): Cargo.toml $(RUST_SOURCES)
|
|||
.PHONY: rust
|
||||
rust: $(RUST_LIB)
|
||||
|
||||
$(XDIFF_LIB): $(XDIFF_OBJS)
|
||||
$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^
|
||||
|
||||
$(REFTABLE_LIB): $(REFTABLE_OBJS)
|
||||
$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^
|
||||
|
||||
export DEFAULT_EDITOR DEFAULT_PAGER
|
||||
|
||||
Documentation/GIT-EXCLUDED-PROGRAMS: FORCE
|
||||
|
|
@ -3805,7 +3791,7 @@ clean: profile-clean coverage-clean cocciclean
|
|||
$(RM) git.rc git.res
|
||||
$(RM) $(OBJECTS)
|
||||
$(RM) headless-git.o
|
||||
$(RM) $(LIB_FILE) $(XDIFF_LIB) $(REFTABLE_LIB)
|
||||
$(RM) $(LIB_FILE)
|
||||
$(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) $(OTHER_PROGRAMS)
|
||||
$(RM) $(TEST_PROGRAMS)
|
||||
$(RM) $(FUZZ_PROGRAMS)
|
||||
|
|
@ -3999,8 +3985,6 @@ endif
|
|||
|
||||
LIBGIT_PUB_OBJS += contrib/libgit-sys/public_symbol_export.o
|
||||
LIBGIT_PUB_OBJS += libgit.a
|
||||
LIBGIT_PUB_OBJS += reftable/libreftable.a
|
||||
LIBGIT_PUB_OBJS += xdiff/lib.a
|
||||
|
||||
LIBGIT_PARTIAL_EXPORT = contrib/libgit-sys/partial_symbol_export.o
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue