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/sunpro.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/sunpro.mk')
-rw-r--r-- | mk/compiler/sunpro.mk | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/mk/compiler/sunpro.mk b/mk/compiler/sunpro.mk index b15d4eb0ec0..162d06cbfb7 100644 --- a/mk/compiler/sunpro.mk +++ b/mk/compiler/sunpro.mk @@ -1,4 +1,4 @@ -# $NetBSD: sunpro.mk,v 1.10 2004/02/06 04:37:02 jlam Exp $ +# $NetBSD: sunpro.mk,v 1.11 2004/02/07 02:58:10 jlam Exp $ .if !defined(COMPILER_SUNPRO_MK) COMPILER_SUNPRO_MK= one @@ -15,18 +15,24 @@ _LANGUAGES.sunpro= # empty _LANGUAGES.sunpro+= ${LANGUAGES.sunpro:M${_lang_}} . endfor +_SUNPRO_DIR= ${WRKDIR}/.sunpro +_SUNPRO_LINKS= # empty . if !empty(_LANGUAGES.sunpro:Mc) -CC= ${SUNWSPROBASE}/bin/cc -CPP= ${SUNWSPROBASE}/bin/cc -E +_SUNPRO_CC= ${_SUNPRO_DIR}/bin/cc +_SUNPRO_LINKS+= _SUNPRO_CC +CC= ${_SUNPRO_CC} +CPP= ${_SUNPRO_CC} -E . endif . if !empty(_LANGUAGES.sunpro:Mc++) -CXX= ${SUNWSPROBASE}/bin/CC +_SUNPRO_CXX= ${_SUNPRO_DIR}/bin/CC +_SUNPRO_LINKS+= _SUNPRO_CXX +CXX= ${_SUNPRO_CXX} . endif _COMPILER_LD_FLAG= # empty -. if exists(${CC}) -CC_VERSION!= ${CC} -V 2>&1 | ${GREP} '^cc' +. if exists(${SUNWSPROBASE}/bin/cc) +CC_VERSION!= ${SUNWSPROBASE}/bin/cc -V 2>&1 | ${GREP} '^cc' . else CC_VERSION= sunpro . endif @@ -41,10 +47,21 @@ COMPILER_SUNPRO_MK+= two # Prepend the path to the compiler to the PATH. . if !empty(_LANGUAGES.sunpro) -. if empty(PREPEND_PATH:M${SUNWSPROBASE}/bin) -PREPEND_PATH+= ${SUNWSPROBASE}/bin -PATH:= ${SUNWSPROBASE}/bin:${PATH} +. if empty(PREPEND_PATH:M${_SUNPRO_DIR}/bin) +PREPEND_PATH+= ${_SUNPRO_DIR}/bin +PATH:= ${_SUNPRO_DIR}/bin:${PATH} . endif . endif + +# Create symlinks for the compiler into ${WRKDIR}. +. for _target_ in ${_SUNPRO_LINKS} +. if !target(${${_target_}}) +override-tools: ${${_target_}} +${${_target_}}: + ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} + ${_PKG_SILENT}${_PKG_DEBUG} \ + ${LN} -fs ${SUNWSPROBASE}/bin/${${_target_}:T} ${.TARGET} +. endif +. endfor . endif # COMPILER_SUNPRO_MK .endif # BSD_PREFS_MK |