diff options
author | jlam <jlam> | 2006-06-09 13:59:06 +0000 |
---|---|---|
committer | jlam <jlam> | 2006-06-09 13:59:06 +0000 |
commit | 7e84eca891de4df59bcecc961eb93715d7eadbdb (patch) | |
tree | bc3ee1d8414671473ac53f6468293fea0563cf1d /mk/compiler.mk | |
parent | 5e70459214d534d0a4a83a6745444816d8156296 (diff) | |
download | pkgsrc-7e84eca891de4df59bcecc961eb93715d7eadbdb.tar.gz |
Introduce the capability to gather all the warnings and errors that
are generated for a target and output them all at once at the conclusion
of the target's invocation. The implementation is in bsd.pkg.error.mk,
which defines a macro target "error-check" that will print out any
non-empty warning and error files in ${WARNING_DIR} and ${ERROR_DIR}
and exit appropriately if there were errors.
Convert some targets that were just long sequences of ${ERROR_MSG} or
${WARNING_MSG} within a single shell statement to use the new delayed
error output via error-check.
Modify the compiler "fail" wrappers for C++ and Fortran to be less
verbose during invocation. Instead collect the warnings and only
print them at the end of the completed phase, e.g. after "configure"
and/or "build" completes.
Diffstat (limited to 'mk/compiler.mk')
-rw-r--r-- | mk/compiler.mk | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mk/compiler.mk b/mk/compiler.mk index 7ffe0aaf7eb..36290b50981 100644 --- a/mk/compiler.mk +++ b/mk/compiler.mk @@ -1,4 +1,4 @@ -# $NetBSD: compiler.mk,v 1.50 2006/05/12 21:37:08 jlam Exp $ +# $NetBSD: compiler.mk,v 1.51 2006/06/09 13:59:08 jlam Exp $ # # This Makefile fragment implements handling for supported C/C++/Fortran # compilers. @@ -159,7 +159,13 @@ ${_FAIL_WRAPPER.FC}: fail-wrapper .PHONY: fail-wrapper fail-wrapper: .USE ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} - ${_PKG_SILENT}${_PKG_DEBUG}${ECHO} ${ECHO:Q}" 1>&2 \"===>\"; "${ECHO:Q}" 1>&2 \"===> Please add USE_LANGUAGES+="${.TARGET:T:S/-fail-wrapper//:Q}" to the package Makefile.\"; "${ECHO:Q}" 1>&2 \"===>\"; exit 1" > ${.TARGET} + ${_PKG_SILENT}${_PKG_DEBUG} \ + exec 1>${.TARGET}; \ + ${ECHO} '#!'${TOOLS_SHELL:Q}; \ + ${ECHO} 'wrapperlog="$${TOOLS_WRAPPER_LOG-'${_TOOLS_WRAP_LOG:Q}'}"'; \ + ${ECHO} ${ECHO:Q} '"*** Please add USE_LANGUAGES+='${.TARGET:T:S/-fail-wrapper//:Q}' to the package Makefile." >> $$wrapperlog'; \ + ${ECHO} ${ECHO:Q} '"*** Please add USE_LANGUAGES+='${.TARGET:T:S/-fail-wrapper//:Q}' to the package Makefile." > ${WARNING_DIR}/${.TARGET:T}'; \ + ${ECHO} 'exit 1' ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET} .if empty(USE_LANGUAGES:Mc++) |