summaryrefslogtreecommitdiff
path: root/mk/compiler.mk
diff options
context:
space:
mode:
authorjlam <jlam>2006-05-12 21:37:08 +0000
committerjlam <jlam>2006-05-12 21:37:08 +0000
commit7fc986d2c1268ab5c4d0549218b55f9fd9869149 (patch)
tree3e53109dc6b3d3dc2236d5ec28b199c7b6f39c37 /mk/compiler.mk
parent472cee8185cf53f3cb829b484d46434857c39854 (diff)
downloadpkgsrc-7fc986d2c1268ab5c4d0549218b55f9fd9869149.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
Diffstat (limited to 'mk/compiler.mk')
-rw-r--r--mk/compiler.mk11
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