diff options
author | jlam <jlam@pkgsrc.org> | 2006-05-11 22:13:19 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2006-05-11 22:13:19 +0000 |
commit | 48b11c8c118e50b8579b14aff6ea64c5d78e25ec (patch) | |
tree | 8cc7986c58c04c7230554cec03a44a2faefe0b77 /mk/compiler.mk | |
parent | abaa0a66a9702ecc07cfa58e878bb5d99560f921 (diff) | |
download | pkgsrc-48b11c8c118e50b8579b14aff6ea64c5d78e25ec.tar.gz |
Make build failures due to the previous commit less mysterious by using
a wrapper script that emits a hint of what went wrong.
Diffstat (limited to 'mk/compiler.mk')
-rw-r--r-- | mk/compiler.mk | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/mk/compiler.mk b/mk/compiler.mk index 8c3de6657ea..a57f1b33719 100644 --- a/mk/compiler.mk +++ b/mk/compiler.mk @@ -1,4 +1,4 @@ -# $NetBSD: compiler.mk,v 1.48 2006/05/06 15:20:05 tv Exp $ +# $NetBSD: compiler.mk,v 1.49 2006/05/11 22:13:19 jlam Exp $ # # This Makefile fragment implements handling for supported C/C++/Fortran # compilers. @@ -150,12 +150,25 @@ _WRAP_EXTRA_ARGS.LD+= ${_LINKER_ABI_FLAG.${ABI}} # If the languages are not requested, force them not to be available # in the generated wrappers. # +_FAIL_WRAPPER.CXX= ${TOOLS_DIR}/bin/c++-fail-wrapper +_FAIL_WRAPPER.FC= ${TOOLS_DIR}/bin/fortran-fail-wrapper + +${_FAIL_WRAPPER.CXX}: fail-wrapper +${_FAIL_WRAPPER.FC}: fail-wrapper + +.PHONY: fail-wrapper +fail-wrapper: .USE + ${_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}${CHMOD} +x ${.TARGET} + .if empty(USE_LANGUAGES:Mc++) -PKG_CXX:= ${FALSE} +PKG_CXX:= ${TOOLS_DIR}/bin/c++-fail-wrapper ALL_ENV+= CXXCPP=${CPP:Q} # to make some Autoconf scripts happy +override-tools: ${_FAIL_WRAPPER.CXX} .endif .if empty(USE_LANGUAGES:Mfortran) -PKG_FC:= ${FALSE} +PKG_FC:= ${TOOLS_DIR}/bin/fortran-fail-wrapper +override-tools: ${_FAIL_WRAPPER.FC} .endif .endif # BSD_COMPILER_MK |