Skip to content

Commit cf680cd

Browse files
ezekielnewrengitster
authored andcommitted
make: delete XDIFF_LIB, add xdiff to LIB_OBJS
In a future patch series the 'xdiff' Rust crate will be added. Delete the creation of the static library file for xdiff to avoid a name conflict. This also moves toward the goal of Rust only needing to link against libgit.a. Changes to Meson are not required as the xdiff library is already included in Meson's libgit.a. xdiff-objs was a historical make target to allow building just the objects in xdiff. Since it was defined in terms of XDIFF_OBJS (which no longer exists) this convenience make target no longer makes sense. Remove it. Signed-off-by: Ezekiel Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 821f583 commit cf680cd

File tree

1 file changed

+10
-19
lines changed

1 file changed

+10
-19
lines changed

Makefile

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,6 @@ export PYTHON_PATH
916916
TEST_SHELL_PATH = $(SHELL_PATH)
917917

918918
LIB_FILE = libgit.a
919-
XDIFF_LIB = xdiff/lib.a
920919
REFTABLE_LIB = reftable/libreftable.a
921920

922921
GENERATED_H += command-list.h
@@ -1207,6 +1206,13 @@ LIB_OBJS += write-or-die.o
12071206
LIB_OBJS += ws.o
12081207
LIB_OBJS += wt-status.o
12091208
LIB_OBJS += xdiff-interface.o
1209+
LIB_OBJS += xdiff/xdiffi.o
1210+
LIB_OBJS += xdiff/xemit.o
1211+
LIB_OBJS += xdiff/xhistogram.o
1212+
LIB_OBJS += xdiff/xmerge.o
1213+
LIB_OBJS += xdiff/xpatience.o
1214+
LIB_OBJS += xdiff/xprepare.o
1215+
LIB_OBJS += xdiff/xutils.o
12101216

12111217
BUILTIN_OBJS += builtin/add.o
12121218
BUILTIN_OBJS += builtin/am.o
@@ -1388,8 +1394,8 @@ CLAR_TEST_OBJS += $(UNIT_TEST_DIR)/unit-test.o
13881394

13891395
UNIT_TEST_OBJS += $(UNIT_TEST_DIR)/test-lib.o
13901396

1391-
# xdiff and reftable libs may in turn depend on what is in libgit.a
1392-
GITLIBS = common-main.o $(LIB_FILE) $(XDIFF_LIB) $(REFTABLE_LIB) $(LIB_FILE)
1397+
# reftable lib may in turn depend on what is in libgit.a
1398+
GITLIBS = common-main.o $(LIB_FILE) $(REFTABLE_LIB) $(LIB_FILE)
13931399
EXTLIBS =
13941400

13951401
GIT_USER_AGENT = git/$(GIT_VERSION)
@@ -2721,16 +2727,6 @@ reconfigure config.mak.autogen: config.status
27212727
.PHONY: reconfigure # This is a convenience target.
27222728
endif
27232729

2724-
XDIFF_OBJS += xdiff/xdiffi.o
2725-
XDIFF_OBJS += xdiff/xemit.o
2726-
XDIFF_OBJS += xdiff/xhistogram.o
2727-
XDIFF_OBJS += xdiff/xmerge.o
2728-
XDIFF_OBJS += xdiff/xpatience.o
2729-
XDIFF_OBJS += xdiff/xprepare.o
2730-
XDIFF_OBJS += xdiff/xutils.o
2731-
.PHONY: xdiff-objs
2732-
xdiff-objs: $(XDIFF_OBJS)
2733-
27342730
REFTABLE_OBJS += reftable/basics.o
27352731
REFTABLE_OBJS += reftable/error.o
27362732
REFTABLE_OBJS += reftable/block.o
@@ -2765,7 +2761,6 @@ OBJECTS += $(GIT_OBJS)
27652761
OBJECTS += $(SCALAR_OBJS)
27662762
OBJECTS += $(PROGRAM_OBJS)
27672763
OBJECTS += $(TEST_OBJS)
2768-
OBJECTS += $(XDIFF_OBJS)
27692764
OBJECTS += $(FUZZ_OBJS)
27702765
OBJECTS += $(REFTABLE_OBJS) $(REFTABLE_TEST_OBJS)
27712766
OBJECTS += $(UNIT_TEST_OBJS)
@@ -2919,9 +2914,6 @@ scalar$X: scalar.o GIT-LDFLAGS $(GITLIBS)
29192914
$(LIB_FILE): $(LIB_OBJS)
29202915
$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^
29212916

2922-
$(XDIFF_LIB): $(XDIFF_OBJS)
2923-
$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^
2924-
29252917
$(REFTABLE_LIB): $(REFTABLE_OBJS)
29262918
$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^
29272919

@@ -3763,7 +3755,7 @@ clean: profile-clean coverage-clean cocciclean
37633755
$(RM) git.rc git.res
37643756
$(RM) $(OBJECTS)
37653757
$(RM) headless-git.o
3766-
$(RM) $(LIB_FILE) $(XDIFF_LIB) $(REFTABLE_LIB)
3758+
$(RM) $(LIB_FILE) $(REFTABLE_LIB)
37673759
$(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) $(OTHER_PROGRAMS)
37683760
$(RM) $(TEST_PROGRAMS)
37693761
$(RM) $(FUZZ_PROGRAMS)
@@ -3957,7 +3949,6 @@ endif
39573949
LIBGIT_PUB_OBJS += contrib/libgit-sys/public_symbol_export.o
39583950
LIBGIT_PUB_OBJS += libgit.a
39593951
LIBGIT_PUB_OBJS += reftable/libreftable.a
3960-
LIBGIT_PUB_OBJS += xdiff/lib.a
39613952

39623953
LIBGIT_PARTIAL_EXPORT = contrib/libgit-sys/partial_symbol_export.o
39633954

0 commit comments

Comments
 (0)