diff src/Makefile @ 14696:195e8b1fcbbf v8.1.0360

patch 8.1.0360: using an external diff program is slow and inflexible commit https://github.com/vim/vim/commit/e828b7621cf9065a3582be0c4dd1e0e846e335bf Author: Bram Moolenaar <Bram@vim.org> Date: Mon Sep 10 17:51:58 2018 +0200 patch 8.1.0360: using an external diff program is slow and inflexible Problem: Using an external diff program is slow and inflexible. Solution: Include the xdiff library. (Christian Brabandt, closes https://github.com/vim/vim/issues/2732) Use it by default.
author Christian Brabandt <cb@256bit.org>
date Mon, 10 Sep 2018 18:00:06 +0200
parents f331b62627db
children 2c72fa16aa70
line wrap: on
line diff
--- a/src/Makefile
+++ b/src/Makefile
@@ -1400,6 +1400,32 @@ TERM_DEPS = \
 
 TERM_SRC = libvterm/src/*.c
 
+XDIFF_SRC = \
+	xdiff/xdiffi.c \
+	xdiff/xemit.c \
+	xdiff/xprepare.c \
+	xdiff/xutils.c \
+	xdiff/xhistogram.c \
+	xdiff/xpatience.c \
+
+XDIFF_OBJS = \
+	objects/xdiffi.o \
+	objects/xemit.o \
+	objects/xprepare.o \
+	objects/xutils.o \
+	objects/xhistogram.o \
+	objects/xpatience.o \
+
+XDIFF_INCL = \
+	xdiff/xdiff.h \
+	xdiff/xdiffi.h \
+	xdiff/xemit.h \
+	xdiff/xinclude.h \
+	xdiff/xmacros.h \
+	xdiff/xprepare.h \
+	xdiff/xtypes.h \
+	xdiff/xutils.h \
+
 ### Command to create dependencies based on #include "..."
 ### prototype headers are ignored due to -DPROTO, system
 ### headers #include <...> are ignored if we use the -MM option, as
@@ -1611,6 +1637,7 @@ BASIC_SRC = \
 SRC =	$(BASIC_SRC) \
 	$(GUI_SRC) \
 	$(TERM_SRC) \
+	$(XDIFF_SRC) \
 	$(HANGULIN_SRC) \
 	$(LUA_SRC) \
 	$(MZSCHEME_SRC) \
@@ -1728,6 +1755,7 @@ OBJ_COMMON = \
 	$(WORKSHOP_OBJ) \
 	$(NETBEANS_OBJ) \
 	$(CHANNEL_OBJ) \
+	$(XDIFF_OBJS) \
 	$(WSDEBUG_OBJ)
 
 # The files included by tests are not in OBJ_COMMON.
@@ -2731,7 +2759,7 @@ SHADOWDIR = shadow
 
 shadow:	runtime pixmaps
 	$(MKDIR_P) $(SHADOWDIR)
-	cd $(SHADOWDIR); ln -s ../*.[chm] ../*.in ../*.sh ../*.xs ../*.xbm ../gui_gtk_res.xml ../toolcheck ../proto ../libvterm ../vimtutor ../gvimtutor ../install-sh ../Make_all.mak .
+	cd $(SHADOWDIR); ln -s ../*.[chm] ../*.in ../*.sh ../*.xs ../*.xbm ../gui_gtk_res.xml ../toolcheck ../proto ../xdiff ../libvterm ../vimtutor ../gvimtutor ../install-sh ../Make_all.mak .
 	mkdir $(SHADOWDIR)/auto
 	cd $(SHADOWDIR)/auto; ln -s ../../auto/configure .
 	$(MKDIR_P) $(SHADOWDIR)/po
@@ -2915,7 +2943,7 @@ objects/crypt_zip.o: crypt_zip.c
 objects/dict.o: dict.c
 	$(CCC) -o $@ dict.c
 
-objects/diff.o: diff.c
+objects/diff.o: diff.c $(XDIFF_INCL)
 	$(CCC) -o $@ diff.c
 
 objects/digraph.o: digraph.c
@@ -3229,6 +3257,27 @@ objects/term_unicode.o: libvterm/src/uni
 objects/term_vterm.o: libvterm/src/vterm.c $(TERM_DEPS)
 	$(CCCTERM) -o $@ libvterm/src/vterm.c
 
+CCCDIFF = $(CCC_NF) $(ALL_CFLAGS)
+
+objects/xdiffi.o: xdiff/xdiffi.c $(XDIFF_INCL)
+	$(CCCDIFF) -o $@ xdiff/xdiffi.c
+
+objects/xprepare.o: xdiff/xprepare.c $(XDIFF_INCL)
+	$(CCCDIFF) -o $@ xdiff/xprepare.c
+
+objects/xutils.o: xdiff/xutils.c $(XDIFF_INCL)
+	$(CCCDIFF) -o $@ xdiff/xutils.c
+
+objects/xemit.o: xdiff/xemit.c $(XDIFF_INCL)
+	$(CCCDIFF) -o $@ xdiff/xemit.c
+
+objects/xhistogram.o: xdiff/xhistogram.c $(XDIFF_INCL)
+	$(CCCDIFF) -o $@ xdiff/xhistogram.c
+
+objects/xpatience.o: xdiff/xpatience.c $(XDIFF_INCL)
+	$(CCCDIFF) -o $@ xdiff/xpatience.c
+
+
 ###############################################################################
 ### MacOS X installation
 ###