aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 5f4fc3c..5797dd9 100644
--- a/Makefile
+++ b/Makefile
@@ -8,8 +8,11 @@ FILTER = _extensions/ruc-play/sem-md/sem-md.lua
DIFFTESTS = $(patsubst %.md,%,$(wildcard test/*.md))
-#DIFF = diff -u
-DIFF = git --no-pager diff --no-index
+_which = $(shell command -v $1 >/dev/null 2>&1 && echo $1 $2)
+DIFF = $(strip $(or \
+ $(call _which,delta,--default-language md),\
+ $(call _which,git,--no-pager diff --no-index),\
+ diff -u))
#PANDOC = pandoc -f markdown+fenced_divs+bracketed_spans-auto_identifiers
PANDOC = pandoc --from commonmark