summaryrefslogtreecommitdiffstats
path: root/src/Make_cyg_ming.mak
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-09-10 17:51:58 +0200
committerBram Moolenaar <Bram@vim.org>2018-09-10 17:51:58 +0200
commite828b7621cf9065a3582be0c4dd1e0e846e335bf (patch)
tree79cf05b6295837108fb6edbbc154e333c940698a /src/Make_cyg_ming.mak
parent93a1df2c205c8399d96c172d9483e0793d32892a (diff)
patch 8.1.0360: using an external diff program is slow and inflexiblev8.1.0360
Problem: Using an external diff program is slow and inflexible. Solution: Include the xdiff library. (Christian Brabandt, closes #2732) Use it by default.
Diffstat (limited to 'src/Make_cyg_ming.mak')
-rw-r--r--src/Make_cyg_ming.mak53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/Make_cyg_ming.mak b/src/Make_cyg_ming.mak
index 16cd71259c..2308135b52 100644
--- a/src/Make_cyg_ming.mak
+++ b/src/Make_cyg_ming.mak
@@ -166,6 +166,25 @@ else
ifndef CROSS_COMPILE
CROSS_COMPILE =
endif
+
+# About the "sh.exe" condition, as explained by Ken Takata:
+#
+# If the makefile is executed with mingw32-make and sh.exe is not found in
+# $PATH, then $SHELL is set to "sh.exe" (without any path). In this case,
+# unix-like commands might not work and a dos-style path is needed.
+#
+# If the makefile is executed with mingw32-make and sh.exe IS found in $PATH,
+# then $SHELL is set with the actual path of sh.exe (e.g.
+# "C:/msys64/usr/bin/sh.exe"). In this case, unix-like commands can be used.
+#
+# If it is executed by the "make" command from cmd.exe, $SHELL is set to
+# "/bin/sh". If the "make" command is in the $PATH, other unix-like commands
+# might also work.
+#
+# If it is executed by the "make" command from a unix-like shell,
+# $SHELL is set with the unix-style path (e.g. "/bin/bash").
+# In this case, unix-like commands can be used.
+#
ifneq (sh.exe, $(SHELL))
DEL = rm
MKDIR = mkdir -p
@@ -810,6 +829,23 @@ OBJ += $(OUTDIR)/terminal.o \
$(OUTDIR)/term_vterm.o
endif
+# Include xdiff
+OBJ += $(OUTDIR)/xdiffi.o \
+ $(OUTDIR)/xemit.o \
+ $(OUTDIR)/xprepare.o \
+ $(OUTDIR)/xutils.o \
+ $(OUTDIR)/xhistogram.o \
+ $(OUTDIR)/xpatience.o
+
+XDIFF_DEPS = \
+ xdiff/xdiff.h \
+ xdiff/xdiffi.h \
+ xdiff/xemit.h \
+ xdiff/xinclude.h \
+ xdiff/xmacros.h \
+ xdiff/xprepare.h \
+ xdiff/xtypes.h \
+ xdiff/xutils.h
ifdef MZSCHEME
MZSCHEME_SUFFIX = Z
@@ -1055,6 +1091,23 @@ $(OUTDIR)/term_unicode.o: libvterm/src/unicode.c $(TERM_DEPS)
$(OUTDIR)/term_vterm.o: libvterm/src/vterm.c $(TERM_DEPS)
$(CCCTERM) libvterm/src/vterm.c -o $@
+$(OUTDIR)/xdiffi.o: xdiff/xdiffi.c $(XDIFF_DEPS)
+ $(CC) -c $(CFLAGS) xdiff/xdiffi.c -o $(OUTDIR)/xdiffi.o
+
+$(OUTDIR)/xemit.o: xdiff/xemit.c $(XDIFF_DEPS)
+ $(CC) -c $(CFLAGS) xdiff/xemit.c -o $(OUTDIR)/xemit.o
+
+$(OUTDIR)/xprepare.o: xdiff/xprepare.c $(XDIFF_DEPS)
+ $(CC) -c $(CFLAGS) xdiff/xprepare.c -o $(OUTDIR)/xprepare.o
+
+$(OUTDIR)/xutils.o: xdiff/xutils.c $(XDIFF_DEPS)
+ $(CC) -c $(CFLAGS) xdiff/xutils.c -o $(OUTDIR)/xutils.o
+
+$(OUTDIR)/xhistogram.o: xdiff/xhistogram.c $(XDIFF_DEPS)
+ $(CC) -c $(CFLAGS) xdiff/xhistogram.c -o $(OUTDIR)/xhistogram.o
+
+$(OUTDIR)/xpatience.o: xdiff/xpatience.c $(XDIFF_DEPS)
+ $(CC) -c $(CFLAGS) xdiff/xpatience.c -o $(OUTDIR)/xpatience.o
pathdef.c: $(INCL)
ifneq (sh.exe, $(SHELL))