summaryrefslogtreecommitdiff
path: root/mk/compiler/sunpro.mk
diff options
context:
space:
mode:
authorjlam <jlam>2005-01-12 18:37:52 +0000
committerjlam <jlam>2005-01-12 18:37:52 +0000
commit898c2b06b0fcbd96c4602e35c4682e83cd295916 (patch)
tree0c2a6127acc681cbf16cccdda54f43a706c7c1a4 /mk/compiler/sunpro.mk
parentba7e6f6b0abacf76cd890b99ea4d0f38b7411340 (diff)
downloadpkgsrc-898c2b06b0fcbd96c4602e35c4682e83cd295916.tar.gz
Rearrange how LANGUAGES.<compiler> is set so that we can more flexibly
detect when only parts of a compiler toolchain are present, e.g. the SunPro C compiler is installed, but not the Fortran-77 compiler.
Diffstat (limited to 'mk/compiler/sunpro.mk')
-rw-r--r--mk/compiler/sunpro.mk23
1 files changed, 14 insertions, 9 deletions
diff --git a/mk/compiler/sunpro.mk b/mk/compiler/sunpro.mk
index 251530660c4..7706ef67b16 100644
--- a/mk/compiler/sunpro.mk
+++ b/mk/compiler/sunpro.mk
@@ -1,4 +1,4 @@
-# $NetBSD: sunpro.mk,v 1.30 2005/01/12 17:40:48 jlam Exp $
+# $NetBSD: sunpro.mk,v 1.31 2005/01/12 18:37:52 jlam Exp $
.if !defined(COMPILER_SUNPRO_MK)
COMPILER_SUNPRO_MK= defined
@@ -7,19 +7,15 @@ COMPILER_SUNPRO_MK= defined
SUNWSPROBASE?= /opt/SUNWspro
-# LANGUAGES.<compiler> is the list of supported languages by the compiler.
-# _LANGUAGES.<compiler> is ${LANGUAGES.<compiler>} restricted to the ones
-# requested by the package in USE_LANGUAGES.
+# LANGUAGES.<compiler> is the list of supported languages by the
+# compiler.
#
-LANGUAGES.sunpro= c c++
-_LANGUAGES.sunpro= # empty
-.for _lang_ in ${USE_LANGUAGES}
-_LANGUAGES.sunpro+= ${LANGUAGES.sunpro:M${_lang_}}
-.endfor
+LANGUAGES.sunpro= # empty
_SUNPRO_DIR= ${WRKDIR}/.sunpro
_SUNPRO_VARS= # empty
.if exists(${SUNWSPROBASE}/bin/cc)
+LANGUAGES.sunpro+= c
_SUNPRO_VARS+= CC
_SUNPRO_CC= ${_SUNPRO_DIR}/bin/cc
_ALIASES.CC= cc
@@ -27,6 +23,7 @@ CCPATH= ${SUNWSPROBASE}/bin/cc
PKG_CC:= ${_SUNPRO_CC}
.endif
.if exists(${SUNWSPROBASE}/bin/CC)
+LANGUAGES.sunpro+= c++
_SUNPRO_VARS+= CXX
_SUNPRO_CXX= ${_SUNPRO_DIR}/bin/CC
_ALIASES.CXX= CC c++
@@ -52,6 +49,14 @@ CC_VERSION_STRING?= ${CC_VERSION}
CC_VERSION?= cc: Sun C
.endif
+# _LANGUAGES.<compiler> is ${LANGUAGES.<compiler>} restricted to the
+# ones requested by the package in USE_LANGUAGES.
+#
+_LANGUAGES.sunpro= # empty
+.for _lang_ in ${USE_LANGUAGES}
+_LANGUAGES.sunpro+= ${LANGUAGES.sunpro:M${_lang_}}
+.endfor
+
# Prepend the path to the compiler to the PATH.
.if !empty(_LANGUAGES.sunpro)
PREPEND_PATH+= ${_SUNPRO_DIR}/bin