From fa15bc25d3026b6d77c69ddf2cac2a3c3003bf93 Mon Sep 17 00:00:00 2001 From: jlam Date: Wed, 14 Jun 2006 15:09:34 +0000 Subject: 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. --- mk/check/check-interpreter.mk | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'mk/check') diff --git a/mk/check/check-interpreter.mk b/mk/check/check-interpreter.mk index af7f8b7b0f9..fa3fc5faf59 100644 --- a/mk/check/check-interpreter.mk +++ b/mk/check/check-interpreter.mk @@ -1,4 +1,4 @@ -# $NetBSD: check-interpreter.mk,v 1.5 2006/06/12 03:42:02 jlam Exp $ +# $NetBSD: check-interpreter.mk,v 1.6 2006/06/14 15:09:34 jlam Exp $ CHECK_INTERPRETER?= no @@ -26,17 +26,13 @@ check-interpreter: error-check @${STEP_MSG} "Checking for non-existent script interpreters" \ "in ${PKGNAME}" .if !defined(NO_PKG_REGISTER) - ${_PKG_SILENT}${_PKG_DEBUG} \ - ${RM} -f ${ERROR_DIR}/${.TARGET} ${WARNING_DIR}/${.TARGET} - ${_PKG_SILENT}${_PKG_DEBUG} \ - ${TOUCH} ${TOUCH_ARGS} ${ERROR_DIR}/${.TARGET} ${WARNING_DIR}/${.TARGET} ${_PKG_SILENT}${_PKG_DEBUG} \ ${PKG_FILELIST_CMD} | ${SORT} | ${SED} 's,\\,\\\\,g' | \ while read file; do \ ${_CHECK_INTERP_SKIP_FILTER}; \ ${SHCOMMENT} "[$$file]"; \ interp=`${SED} -n -e '1s/^#![[:space:]]*\([^[:space:]]*\).*/\1/p' -e '1q' < "$$file"` \ - || { ${ECHO} "[check-interpreter.mk] sed(1) failed for \"$$file\"." >> ${WARNING_DIR}/${.TARGET}; \ + || { ${DELAYED_WARNING_MSG} "[check-interpreter.mk] sed(1) failed for \"$$file\"."; \ continue; \ }; \ case $$interp in \ @@ -44,9 +40,9 @@ check-interpreter: error-check esac; \ if ${TEST} ! -f "$$interp"; then \ if ${TEST} -x "$$file"; then \ - ${ECHO} "[check-interpreter.mk] The interpreter \"$$interp\" of \"$$file\" does not exist." >> ${ERROR_DIR}/${.TARGET}; \ + ${DELAYED_ERROR_MSG} "[check-interpreter.mk] The interpreter \"$$interp\" of \"$$file\" does not exist."; \ else \ - ${ECHO} "[check-interpreter.mk] The interpreter \"$$interp\" of \"$$file\" does not exist." >> ${WARNING_DIR}/${.TARGET}; \ + ${DELAYED_WARNING_MSG} "[check-interpreter.mk] The interpreter \"$$interp\" of \"$$file\" does not exist."; \ fi; \ fi; \ done -- cgit v1.2.3