pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Allow package developers to easily see and check th...
details: https://anonhg.NetBSD.org/pkgsrc/rev/fc97cf37aef0
branches: trunk
changeset: 373479:fc97cf37aef0
user: rillig <rillig%pkgsrc.org@localhost>
date: Tue Jan 02 21:18:48 2018 +0000
description:
Allow package developers to easily see and check the SUBST changes.
diffstat:
mk/subst.mk | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diffs (30 lines):
diff -r e71f0d93d0be -r fc97cf37aef0 mk/subst.mk
--- a/mk/subst.mk Tue Jan 02 21:11:10 2018 +0000
+++ b/mk/subst.mk Tue Jan 02 21:18:48 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: subst.mk,v 1.55 2016/01/31 17:27:41 rillig Exp $
+# $NetBSD: subst.mk,v 1.56 2018/01/02 21:18:48 rillig Exp $
#
# This Makefile fragment implements a general text replacement facility.
# Package makefiles define a ``class'', for each of which a particular
@@ -45,6 +45,10 @@
# before any substitutions are done to it. Since that test is not
# perfect, it can be disabled by setting this variable to "yes".
#
+# SUBST_SHOW_DIFF.<class>
+# During development of a package, this can be set to "yes" to see
+# the actual changes as a unified diff.
+#
# See also:
# PLIST_SUBST
#
@@ -80,6 +84,9 @@
. for v in ${SUBST_VARS.${_class_}}
SUBST_FILTER_CMD.${_class_} += -e s,@${v}@,${${v}:S|\\|\\\\|gW:S|,|\\,|gW:S|&|\\\&|gW:Q},g
. endfor
+. if !empty(SUBST_SHOW_DIFF.${_class_}:Uno:M[Yy][Ee][Ss])
+_SUBST_KEEP.${_class_}?= ${DIFF} -u "$$file" "$$tmpfile" || true
+. endif
_SUBST_KEEP.${_class_}?= ${DO_NADA}
SUBST_SKIP_TEXT_CHECK.${_class_}?= no
Home |
Main Index |
Thread Index |
Old Index