pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/compiler Rearrange how LANGUAGES.<compiler> is set ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/312130c38436
branches:  trunk
changeset: 487322:312130c38436
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Wed Jan 12 18:37:52 2005 +0000

description:
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:

 mk/compiler/ccc.mk     |  31 ++++++++++++++++---------------
 mk/compiler/mipspro.mk |  25 +++++++++++++++----------
 mk/compiler/sunpro.mk  |  23 ++++++++++++++---------
 mk/compiler/xlc.mk     |  23 ++++++++++++++---------
 4 files changed, 59 insertions(+), 43 deletions(-)

diffs (230 lines):

diff -r 335c5d7dd600 -r 312130c38436 mk/compiler/ccc.mk
--- a/mk/compiler/ccc.mk        Wed Jan 12 18:36:11 2005 +0000
+++ b/mk/compiler/ccc.mk        Wed Jan 12 18:37:52 2005 +0000
@@ -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 @@
 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 -r 335c5d7dd600 -r 312130c38436 mk/compiler/mipspro.mk
--- a/mk/compiler/mipspro.mk    Wed Jan 12 18:36:11 2005 +0000
+++ b/mk/compiler/mipspro.mk    Wed Jan 12 18:37:52 2005 +0000
@@ -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 @@
 
 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 @@
 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.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 -r 335c5d7dd600 -r 312130c38436 mk/compiler/sunpro.mk
--- a/mk/compiler/sunpro.mk     Wed Jan 12 18:36:11 2005 +0000
+++ b/mk/compiler/sunpro.mk     Wed Jan 12 18:37:52 2005 +0000
@@ -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 @@
 
 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 @@
 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?=           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 -r 335c5d7dd600 -r 312130c38436 mk/compiler/xlc.mk
--- a/mk/compiler/xlc.mk        Wed Jan 12 18:36:11 2005 +0000
+++ b/mk/compiler/xlc.mk        Wed Jan 12 18:37:52 2005 +0000
@@ -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 @@
 
 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 @@
 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 @@
 # 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



Home | Main Index | Thread Index | Old Index