diff options
author | jlam <jlam@pkgsrc.org> | 2006-05-12 21:37:08 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2006-05-12 21:37:08 +0000 |
commit | bc093b5ba21a4a8ef02dfcd176372e9db21ee8c7 (patch) | |
tree | 3e53109dc6b3d3dc2236d5ec28b199c7b6f39c37 | |
parent | f7111e3ba57e7aaa55bab1e2ca728ecae2e32995 (diff) | |
download | pkgsrc-bc093b5ba21a4a8ef02dfcd176372e9db21ee8c7.tar.gz |
Fix a problem that occurs if compiler.mk is included in a package's
Makefile, which means it occurs before bsd.tools.mk is included and
thus misses the definition of TOOLS_DIR. We now create a new subdirectory
of ${WRKDIR} to house the wrappers instead of re-using ${TOOLS_DIR}.
Problem noted by Roland Illig on tech-pkg:
http://mail-index.netbsd.org/tech-pkg/2006/05/12/0011.html
-rw-r--r-- | mk/compiler.mk | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mk/compiler.mk b/mk/compiler.mk index a57f1b33719..7ffe0aaf7eb 100644 --- a/mk/compiler.mk +++ b/mk/compiler.mk @@ -1,4 +1,4 @@ -# $NetBSD: compiler.mk,v 1.49 2006/05/11 22:13:19 jlam Exp $ +# $NetBSD: compiler.mk,v 1.50 2006/05/12 21:37:08 jlam Exp $ # # This Makefile fragment implements handling for supported C/C++/Fortran # compilers. @@ -150,24 +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= ${WRKDIR}/.compiler/bin/c++-fail-wrapper +_FAIL_WRAPPER.FC= ${WRKDIR}/.compiler/bin/fortran-fail-wrapper ${_FAIL_WRAPPER.CXX}: fail-wrapper ${_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}${CHMOD} +x ${.TARGET} .if empty(USE_LANGUAGES:Mc++) -PKG_CXX:= ${TOOLS_DIR}/bin/c++-fail-wrapper +PKG_CXX:= ${_FAIL_WRAPPER.CXX} ALL_ENV+= CXXCPP=${CPP:Q} # to make some Autoconf scripts happy override-tools: ${_FAIL_WRAPPER.CXX} .endif .if empty(USE_LANGUAGES:Mfortran) -PKG_FC:= ${TOOLS_DIR}/bin/fortran-fail-wrapper +PKG_FC:= ${_FAIL_WRAPPER.FC} override-tools: ${_FAIL_WRAPPER.FC} .endif |