aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/diff/Makefile
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2024-03-27 10:03:33 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2024-03-27 10:03:33 +0000
commitd9a9f23d0b3f1676d5656b76301341c0037d15b7 (patch)
treeb777de0c3a7fdee5c29a4643870ff50c97f7f8eb /usr.bin/diff/Makefile
parent5fbe8912d6a2d1178468d1994c301d4c7cd4f975 (diff)
downloadsrc-d9a9f23d0b3f1676d5656b76301341c0037d15b7.tar.gz
src-d9a9f23d0b3f1676d5656b76301341c0037d15b7.zip
diff: Integrate libdiff from OpenBSD GoT.
This adds support for two new diff algorithms, Myers diff and Patience diff. These algorithms perform a different form of search compared to the classic Stone algorithm and support escapes when worst case scenarios are encountered. Add the -A flag to allow selection of the algorithm, but default to using the new Myers diff implementation. The libdiff implementation currently only supports a subset of input and output options supported by diff. When these options are used, but the algorithm is not selected, automatically fallback to the classic Stone algorithm until support for these modes can be added. Based on work originally done by thj@ with contributions from kevans@. Sponsored by: Klara, Inc. Reviewed by: thj Differential Revision: https://reviews.freebsd.org/D44302
Diffstat (limited to 'usr.bin/diff/Makefile')
-rw-r--r--usr.bin/diff/Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/diff/Makefile b/usr.bin/diff/Makefile
index 198e107ec1c4..20eaaf8e1dff 100644
--- a/usr.bin/diff/Makefile
+++ b/usr.bin/diff/Makefile
@@ -1,9 +1,10 @@
-
.include <src.opts.mk>
PROG= diff
-SRCS= diff.c diffdir.c diffreg.c xmalloc.c pr.c
-LIBADD= m
+SRCS= diff.c diffdir.c diffreg.c xmalloc.c pr.c diffreg_new.c
+
+LIBADD= m diff
+CFLAGS+= -I${.CURDIR} -I${SRCTOP}/contrib/libdiff/lib -I${SRCTOP}/contrib/libdiff/include
HAS_TESTS=
SUBDIR.${MK_TESTS}+= tests