From c2d1bf3598df054ad03494c7dca868bf4711408b Mon Sep 17 00:00:00 2001 From: jlam Date: Fri, 12 May 2006 21:37:08 +0000 Subject: 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 --- mk/compiler.mk | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'mk') 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 -- cgit v1.2.3