diff options
author | jlam <jlam> | 2004-02-07 02:58:10 +0000 |
---|---|---|
committer | jlam <jlam> | 2004-02-07 02:58:10 +0000 |
commit | 805a899c6a8ef20f3fa78bfab58bbc6d9523accc (patch) | |
tree | 829dfc35628809250d2da262cd9d904ead559348 /mk/compiler/ccache.mk | |
parent | a3cad2e6d8c627a9ca87a46cfc1765f3823c8267 (diff) | |
download | pkgsrc-805a899c6a8ef20f3fa78bfab58bbc6d9523accc.tar.gz |
Symlink the compiler into ${WRKDIR} so that there's a consistent path to
the compiler and that it's behind .tools/bin and .buildlink/bin, regardless
of whether or not we're using gcc3-c or not, or whether it's been installed
yet in the process of satisfying dependencies, etc.
Diffstat (limited to 'mk/compiler/ccache.mk')
-rw-r--r-- | mk/compiler/ccache.mk | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/mk/compiler/ccache.mk b/mk/compiler/ccache.mk index e636c0b7d6d..b4f94070624 100644 --- a/mk/compiler/ccache.mk +++ b/mk/compiler/ccache.mk @@ -1,4 +1,4 @@ -# $NetBSD: ccache.mk,v 1.10 2004/02/06 04:37:02 jlam Exp $ +# $NetBSD: ccache.mk,v 1.11 2004/02/07 02:58:10 jlam Exp $ .if !defined(COMPILER_CCACHE_MK) COMPILER_CCACHE_MK= one @@ -38,12 +38,14 @@ _CCACHEBASE?= ${LOCALBASE} _CCACHE_DIR= ${WRKDIR}/.ccache _CCACHE_LINKS= # empty . if !empty(_LANGUAGES.ccache:Mc) -CC:= ${_CCACHE_DIR}/bin/${CC:T} -_CCACHE_LINKS+= CC +_CCACHE_CC:= ${_CCACHE_DIR}/bin/${CC:T} +_CCACHE_LINKS+= _CCACHE_CC +CC= ${_CCACHE_CC} . endif . if !empty(_LANGUAGES.ccache:Mc++) -CXX:= ${_CCACHE_DIR}/bin/${CXX:T} -_CCACHE_LINKS+= CXX +_CCACHE_CXX:= ${_CCACHE_DIR}/bin/${CXX:T} +_CCACHE_LINKS+= _CCACHE_CXX +CXX= ${_CCACHE_CXX} . endif . endif . endif @@ -56,6 +58,7 @@ _CCACHE_LINKS+= CXX . if empty(COMPILER_CCACHE_MK:Mtwo) COMPILER_CCACHE_MK+= two +# Prepend the path the to the compiler to the PATH . if !empty(_USE_CCACHE:M[yY][eE][sS]) . if !empty(_LANGUAGES.ccache) . if empty(PREPEND_PATH:M${_CCACHE_DIR}/bin) @@ -64,15 +67,19 @@ PATH:= ${_CCACHE_DIR}/bin:${PATH} . endif . endif +# Add the dependency on ccache. BUILD_DEPENDS+= ccache-[0-9]*:../../devel/ccache +# Create symlinks for the compiler into ${WRKDIR}. . if exists(${_CCACHEBASE}/bin/ccache) . for _target_ in ${_CCACHE_LINKS} +. if !target(${${_target_}}) override-tools: ${${_target_}} ${${_target_}}: ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} ${_PKG_SILENT}${_PKG_DEBUG} \ ${LN} -fs ${_CCACHEBASE}/bin/ccache ${.TARGET} +. endif . endfor . endif . endif |