diff options
author | rillig <rillig@pkgsrc.org> | 2008-01-18 11:26:11 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2008-01-18 11:26:11 +0000 |
commit | 884f21f398ddaa5518d4126991c5a2471332d687 (patch) | |
tree | 2128eff9f61fb792d33d85dfc8aee56e3103f243 | |
parent | 212334d5a8cd7f705a9b39998b3fead43d1d9c72 (diff) | |
download | pkgsrc-884f21f398ddaa5518d4126991c5a2471332d687.tar.gz |
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.
-rw-r--r-- | mk/subst.mk | 7 |
1 files changed, 4 insertions, 3 deletions
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.<class> -# The message to display when the substitution is done. +# The message to display before doing the substitution. # # SUBST_FILES.<class> # 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}; \ |