summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.error.mk
diff options
context:
space:
mode:
authorjlam <jlam>2006-06-14 15:09:34 +0000
committerjlam <jlam>2006-06-14 15:09:34 +0000
commitfa15bc25d3026b6d77c69ddf2cac2a3c3003bf93 (patch)
tree33507514ac55f66eaa802cb1e94211f0882ae395 /mk/bsd.pkg.error.mk
parent646d6ae86bc7f77c15b6a16ae3c98b4d48d0636b (diff)
downloadpkgsrc-fa15bc25d3026b6d77c69ddf2cac2a3c3003bf93.tar.gz
Create DELAYED_{ERROR,WARNING}_MSG macros that can be used to output
error and warning messages that are picked up by the error-check target. Use them instead of using a bare ${ECHO} for more code clarity. Implemented as suggested by Roland Illig.
Diffstat (limited to 'mk/bsd.pkg.error.mk')
-rw-r--r--mk/bsd.pkg.error.mk9
1 files changed, 8 insertions, 1 deletions
diff --git a/mk/bsd.pkg.error.mk b/mk/bsd.pkg.error.mk
index 4c744e5a1a1..a4d14ebdcc4 100644
--- a/mk/bsd.pkg.error.mk
+++ b/mk/bsd.pkg.error.mk
@@ -1,8 +1,15 @@
-# $NetBSD: bsd.pkg.error.mk,v 1.1 2006/06/09 13:59:06 jlam Exp $
+# $NetBSD: bsd.pkg.error.mk,v 1.2 2006/06/14 15:09:34 jlam Exp $
ERROR_DIR= ${WRKDIR}/.error
WARNING_DIR= ${WRKDIR}/.warning
+# Macros for outputting delayed error and warning messages that are
+# picked up by the error-check target and can be used in place of
+# ${ECHO}. We output to files that are named without leading dots.
+#
+DELAYED_ERROR_MSG?= ${ECHO} >> ${ERROR_DIR}/${.TARGET:T:C/^[.]*//:Q}
+DELAYED_WARNING_MSG?= ${ECHO} >> ${WARNING_DIR}/${.TARGET:T:C/^[.]*//:Q}
+
makedirs: ${ERROR_DIR} ${WARNING_DIR}
${ERROR_DIR} ${WARNING_DIR}:
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET}