summaryrefslogtreecommitdiff
path: root/mk/compiler
diff options
context:
space:
mode:
authorjlam <jlam>2005-01-12 18:37:52 +0000
committerjlam <jlam>2005-01-12 18:37:52 +0000
commitb610a2e6429d498751d7b5cf710be41b0c5e5181 (patch)
tree0c2a6127acc681cbf16cccdda54f43a706c7c1a4 /mk/compiler
parent9bc83acbaca92ec7fe88b6d13bcc852392056fc7 (diff)
downloadpkgsrc-b610a2e6429d498751d7b5cf710be41b0c5e5181.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')
-rw-r--r--mk/compiler/ccc.mk31
-rw-r--r--mk/compiler/mipspro.mk25
-rw-r--r--mk/compiler/sunpro.mk23
-rw-r--r--mk/compiler/xlc.mk23
4 files changed, 59 insertions, 43 deletions
diff --git a/mk/compiler/ccc.mk b/mk/compiler/ccc.mk
index e42197073ae..c66567ab6d7 100644
--- a/mk/compiler/ccc.mk
+++ b/mk/compiler/ccc.mk
@@ -1,34 +1,27 @@
-# $NetBSD: ccc.mk,v 1.11 2005/01/12 17:40:01 jlam Exp $
+# $NetBSD: ccc.mk,v 1.12 2005/01/12 18:37:52 jlam Exp $
.if !defined(COMPILER_CCC_MK)
COMPILER_CCC_MK= defined
.include "../../mk/bsd.prefs.mk"
-# 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.ccc= c
-.if exists(/usr/lib/cmplrs/cxx)
-LANGUAGES.ccc+= c++
-.endif
-_LANGUAGES.ccc= # empty
-.for _lang_ in ${USE_LANGUAGES}
-_LANGUAGES.ccc+= ${LANGUAGES.ccc:M${_lang_}}
-.endfor
+# LANGUAGES.<compiler> is the list of supported languages by the
+# compiler.
+#
+LANGUAGES.ccc= # empty
_CCC_DIR= ${WRKDIR}/.ccc
_CCC_VARS= # empty
.if exists(/usr/bin/cc)
+LANGUAGES.ccc+= c
_CCC_VARS+= CC
_CCC_CC= ${_CCC_DIR}/cc
_ALIASES.CC= cc
CCPATH= /usr/bin/cc
PKG_CC:= ${_CCC_CC}
.endif
-.if exists(/usr/bin/cxx)
+.if exists(/usr/bin/cxx) && exists(/usr/lib/cmplrs/cxx)
+LANGUAGES.ccc+= c++
_CCC_VARS+= CXX
_CCC_CXX= ${_CCC_DIR}/cxx
_ALIASES.CXX= c++ cxx
@@ -58,6 +51,14 @@ _COMPILER_RPATH_FLAG= ${_COMPILER_LD_FLAG}${_LINKER_RPATH_FLAG},
CFLAGS+= -ieee
CXXFLAGS+= -ieee
+# _LANGUAGES.<compiler> is ${LANGUAGES.<compiler>} restricted to the
+# ones requested by the package in USE_LANGUAGES.
+#
+_LANGUAGES.ccc= # empty
+.for _lang_ in ${USE_LANGUAGES}
+_LANGUAGES.ccc+= ${LANGUAGES.ccc:M${_lang_}}
+.endfor
+
# Prepend the path to the compiler to the PATH.
.if !empty(_LANGUAGES.ccc)
PREPEND_PATH+= ${_CCC_DIR}/bin
diff --git a/mk/compiler/mipspro.mk b/mk/compiler/mipspro.mk
index 3d64e72a952..dea3b7230b6 100644
--- a/mk/compiler/mipspro.mk
+++ b/mk/compiler/mipspro.mk
@@ -1,4 +1,4 @@
-# $NetBSD: mipspro.mk,v 1.33 2005/01/12 17:30:34 jlam Exp $
+# $NetBSD: mipspro.mk,v 1.34 2005/01/12 18:37:52 jlam Exp $
.if !defined(COMPILER_MIPSPRO_MK)
COMPILER_MIPSPRO_MK= defined
@@ -7,19 +7,15 @@ COMPILER_MIPSPRO_MK= defined
MIPSPROBASE?= /usr
-# 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.mipspro= c c++
-_LANGUAGES.mipspro= # empty
-.for _lang_ in ${USE_LANGUAGES}
-_LANGUAGES.mipspro+= ${LANGUAGES.mipspro:M${_lang_}}
-.endfor
+# LANGUAGES.<compiler> is the list of supported languages by the
+# compiler.
+#
+LANGUAGES.mipspro= # empty
_MIPSPRO_DIR= ${WRKDIR}/.mipspro
_MIPSPRO_VARS= # empty
.if exists(${MIPSPROBASE}/bin/cc)
+LANGUAGES.mipspro+= c
_MIPSPRO_VARS+= CC
_MIPSPRO_CC= ${_MIPSPRO_DIR}/bin/cc
_ALIASES.CC= cc
@@ -27,6 +23,7 @@ CCPATH= ${MIPSPROBASE}/bin/cc
PKG_CC:= ${_MIPSPRO_CC}
.endif
.if exists(${MIPSPROBASE}/bin/CC)
+LANGUAGES.mipspro+= c++
_MIPSPRO_VARS+= CXX
_MIPSPRO_CXX= ${_MIPSPRO_DIR}/bin/CC
_ALIASES.CXX= CC c++
@@ -58,6 +55,14 @@ _COMPILER_ABI_FLAG.o32= # empty
_COMPILER_ABI_FLAG.n32= -n32
_COMPILER_ABI_FLAG.64= -64
+# _LANGUAGES.<compiler> is ${LANGUAGES.<compiler>} restricted to the
+# ones requested by the package in USE_LANGUAGES.
+#
+_LANGUAGES.mipspro= # empty
+.for _lang_ in ${USE_LANGUAGES}
+_LANGUAGES.mipspro+= ${LANGUAGES.mipspro:M${_lang_}}
+.endfor
+
# Prepend the path to the compiler to the PATH.
.if !empty(_LANGUAGES.mipspro)
PREPEND_PATH+= ${_MIPSPRO_DIR}/bin
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
diff --git a/mk/compiler/xlc.mk b/mk/compiler/xlc.mk
index bd072db2422..340544ea17c 100644
--- a/mk/compiler/xlc.mk
+++ b/mk/compiler/xlc.mk
@@ -1,4 +1,4 @@
-# $NetBSD: xlc.mk,v 1.10 2005/01/12 17:43:04 jlam Exp $
+# $NetBSD: xlc.mk,v 1.11 2005/01/12 18:37:52 jlam Exp $
.if !defined(COMPILER_XLC_MK)
COMPILER_XLC_MK= defined
@@ -7,19 +7,15 @@ COMPILER_XLC_MK= defined
XLCBASE?= /opt/ibmcmp/vacpp/6.0
-# 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.xlc= c c++
-_LANGUAGES.xlc= # empty
-.for _lang_ in ${USE_LANGUAGES}
-_LANGUAGES.xlc+= ${LANGUAGES.xlc:M${_lang_}}
-.endfor
+LANGUAGES.xlc= # empty
_XLC_DIR= ${WRKDIR}/.xlc
_XLC_VARS= # empty
.if exists(${XLCBASE}/bin/xlc)
+LANGUAGES.xlc+= c
_XLC_VARS+= CC
_XLC_CC= ${_XLC_DIR}/bin/xlc
_ALIASES.CC= cc xlc
@@ -27,6 +23,7 @@ CCPATH= ${XLCBASE}/bin/xlc
PKG_CC:= ${_XLC_CC}
.endif
.if exists(${XLCBASE}/bin/xlc++)
+LANGUAGES.xlc+= c++
_XLC_VARS+= CXX
_XLC_CXX= ${_XLC_DIR}/bin/xlc++
_ALIASES.CXX= c++ xlc++
@@ -47,6 +44,14 @@ CC_VERSION?= IBM XL C
# make it the default.
CFLAGS+= -ma
+# _LANGUAGES.<compiler> is ${LANGUAGES.<compiler>} restricted to the
+# ones requested by the package in USE_LANGUAGES.
+#
+_LANGUAGES.xlc= # empty
+.for _lang_ in ${USE_LANGUAGES}
+_LANGUAGES.xlc+= ${LANGUAGES.xlc:M${_lang_}}
+.endfor
+
# Prepend the path to the compiler to the PATH.
.if !empty(_LANGUAGES.xlc)
PREPEND_PATH+= ${_XLC_DIR}/bin