pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk mk/subst.mk: add user-settable SUBST_NOOP_OK



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ffc1b683cfd7
branches:  trunk
changeset: 414765:ffc1b683cfd7
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Wed Apr 01 15:10:09 2020 +0000

description:
mk/subst.mk: add user-settable SUBST_NOOP_OK

This variable allows to make SUBST stricter than before. This will break
several packages that have redundant filename patterns. Most of these are
typos or outdated and should be updated or removed.

diffstat:

 mk/subst.mk |  16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diffs (46 lines):

diff -r 0512a7fdc908 -r ffc1b683cfd7 mk/subst.mk
--- a/mk/subst.mk       Wed Apr 01 14:58:49 2020 +0000
+++ b/mk/subst.mk       Wed Apr 01 15:10:09 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: subst.mk,v 1.73 2020/03/28 20:39:50 rillig Exp $
+# $NetBSD: subst.mk,v 1.74 2020/04/01 15:10:09 rillig Exp $
 #
 # The subst framework replaces text in one or more files in the WRKSRC
 # directory. Packages can define several ``classes'' of replacements.
@@ -21,6 +21,13 @@
 #      Whether to log each changed file as a unified diff, for all
 #      SUBST classes. Defaults to "no".
 #
+# SUBST_NOOP_OK
+#      Whether it is ok to have filename patterns in SUBST_FILES that
+#      don't have any effect.
+#
+#      For backwards compatibility this defaults to "yes", but it
+#      should rather be set to "no".
+#
 # Package-settable variables:
 #
 # SUBST_CLASSES
@@ -86,9 +93,12 @@
 # Keywords: subst
 #
 
+SUBST_SHOW_DIFF?=      no
+SUBST_NOOP_OK?=                yes     # only for backwards compatiblity
+
 _VARGROUPS+=           subst
+_USR_VARS.subst=       SUBST_SHOW_DIFF SUBST_NOOP_OK
 _PKG_VARS.subst=       SUBST_CLASSES
-SUBST_SHOW_DIFF?=      no
 .for c in ${SUBST_CLASSES}
 .  for pv in SUBST_STAGE SUBST_MESSAGE SUBST_FILES SUBST_SED SUBST_VARS        \
        SUBST_FILTER_CMD SUBST_SKIP_TEXT_CHECK SUBST_NOOP_OK
@@ -125,7 +135,7 @@
 .  endif
 _SUBST_KEEP.${_class_}?=       ${DO_NADA}
 SUBST_SKIP_TEXT_CHECK.${_class_}?=     no
-SUBST_NOOP_OK.${_class_}?=     yes # TODO: change to no after 2020Q1
+SUBST_NOOP_OK.${_class_}?=     ${SUBST_NOOP_OK}
 _SUBST_WARN.${_class_}=                ${${SUBST_NOOP_OK.${_class_}:tl} == yes:?${INFO_MSG}:${WARNING_MSG}} "[subst.mk:${_class_}]"
 
 .if !empty(SUBST_SKIP_TEXT_CHECK.${_class_}:M[Yy][Ee][Ss])



Home | Main Index | Thread Index | Old Index