From 884f21f398ddaa5518d4126991c5a2471332d687 Mon Sep 17 00:00:00 2001 From: rillig Date: Fri, 18 Jan 2008 11:26:11 +0000 Subject: If the package doesn't provide a SUBST_MESSAGE, generate a default one. This way, file modifications cannot go unnoticed and at least appear in the build logs. While here, fixed an ambiguity in the description of SUBST_MESSAGE. --- mk/subst.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'mk/subst.mk') diff --git a/mk/subst.mk b/mk/subst.mk index d9ff56f50f0..ee73c7af6ad 100644 --- a/mk/subst.mk +++ b/mk/subst.mk @@ -1,4 +1,4 @@ -# $NetBSD: subst.mk,v 1.50 2008/01/18 11:16:08 rillig Exp $ +# $NetBSD: subst.mk,v 1.51 2008/01/18 11:26:11 rillig Exp $ # # This Makefile fragment implements a general text replacement facility. # Package makefiles define a ``class'', for each of which a particular @@ -15,7 +15,7 @@ # {pre,do,post}-{extract,patch,configure,build,install}. # # SUBST_MESSAGE. -# The message to display when the substitution is done. +# The message to display before doing the substitution. # # SUBST_FILES. # A list of file patterns on which to run the substitution; @@ -75,6 +75,7 @@ _SUBST_COOKIE.${_class_}= ${WRKDIR}/.subst_${_class_}_done SUBST_FILTER_CMD.${_class_}?= ${SED} ${SUBST_SED.${_class_}} SUBST_VARS.${_class_}?= # none +SUBST_MESSAGE.${_class_}?= Substituting "${_class_}" in ${SUBST_FILES.${_class_}} . for v in ${SUBST_VARS.${_class_}} SUBST_FILTER_CMD.${_class_} += -e s,@${v}@,${${v}:S|\\|\\\\|gW:S|,|\\,|gW:S|&|\\\&|gW:Q},g . endfor @@ -100,7 +101,7 @@ ${SUBST_STAGE.${_class_}}: subst-${_class_} subst-${_class_}: ${_SUBST_COOKIE.${_class_}} ${_SUBST_COOKIE.${_class_}}: -. if defined(SUBST_MESSAGE.${_class_}) +. if !empty(SUBST_MESSAGE.${_class_}) ${RUN} ${ECHO_SUBST_MSG} ${SUBST_MESSAGE.${_class_}:Q} . endif ${RUN} cd ${WRKSRC:Q}; \ -- cgit v1.2.3