pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk If the package doesn't provide a SUBST_MESSAGE, gen...
details: https://anonhg.NetBSD.org/pkgsrc/rev/b84d53be6635
branches: trunk
changeset: 537862:b84d53be6635
user: rillig <rillig%pkgsrc.org@localhost>
date: Fri Jan 18 11:26:11 2008 +0000
description:
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.
diffstat:
mk/subst.mk | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r 35199bcc59ce -r b84d53be6635 mk/subst.mk
--- a/mk/subst.mk Fri Jan 18 11:16:08 2008 +0000
+++ b/mk/subst.mk Fri Jan 18 11:26:11 2008 +0000
@@ -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_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-${_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}; \
Home |
Main Index |
Thread Index |
Old Index