summaryrefslogtreecommitdiff
path: root/mk/compiler.mk
diff options
context:
space:
mode:
authorrillig <rillig>2007-06-08 20:48:16 +0000
committerrillig <rillig>2007-06-08 20:48:16 +0000
commit4262611885a38163733a3292e5ee2a6691061879 (patch)
treeb6c2c7a3644a78120db249bf3d3cf9dbeb31a36d /mk/compiler.mk
parent2151caa468472a6067840685a60a865224dfc6ce (diff)
downloadpkgsrc-4262611885a38163733a3292e5ee2a6691061879.tar.gz
Changed the wording of the warning messages when a compiler-fail-wrapper
is run. As a new feature, an error message is printed when the wrapper is called, so that there is a better trace to it than a completely empty output. See also: http://mail-index.netbsd.org/tech-pkg/2007/06/08/0017.html
Diffstat (limited to 'mk/compiler.mk')
-rw-r--r--mk/compiler.mk10
1 files changed, 7 insertions, 3 deletions
diff --git a/mk/compiler.mk b/mk/compiler.mk
index edcfb835acd..66dd60e6538 100644
--- a/mk/compiler.mk
+++ b/mk/compiler.mk
@@ -1,4 +1,4 @@
-# $NetBSD: compiler.mk,v 1.59 2007/04/17 11:05:33 tnn Exp $
+# $NetBSD: compiler.mk,v 1.60 2007/06/08 20:48:16 rillig Exp $
#
# This Makefile fragment implements handling for supported C/C++/Fortran
# compilers.
@@ -172,8 +172,12 @@ fail-wrapper: .USE
exec 1>${.TARGET}; \
${ECHO} '#!'${TOOLS_SHELL:Q}; \
${ECHO} 'wrapperlog="$${TOOLS_WRAPPER_LOG-'${_TOOLS_WRAP_LOG:Q}'}"'; \
- ${ECHO} ${ECHO:Q} '"*** Please consider adding USE_LANGUAGES+='${.TARGET:T:S/-fail-wrapper//:Q}' to the package Makefile." >> $$wrapperlog'; \
- ${ECHO} ${ECHO:Q} '"*** Please consider adding USE_LANGUAGES+='${.TARGET:T:S/-fail-wrapper//:Q}' to the package Makefile." > ${WARNING_DIR}/${.TARGET:T}'; \
+ ${ECHO} 'lang="${.TARGET:T:S/-fail-wrapper//}"'; \
+ ${ECHO} 'msg="*** Please consider adding $$lang to USE_LANGUAGES in the package Makefile."'; \
+ ${ECHO} '${ECHO} "$$msg" >> $$wrapperlog'; \
+ ${ECHO} '${ECHO} "$$msg" >> ${WARNING_DIR}/${.TARGET:T}'; \
+ ${ECHO} '${ECHO} "ERROR: To use this compiler, you have to add $$lang to" 1>&2'; \
+ ${ECHO} '${ECHO} "ERROR: USE_LANGUAGES in the package Makefile." 1>&2'; \
${ECHO} 'exit 1'
${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET}