diff options
author | jlam <jlam@pkgsrc.org> | 2005-01-12 18:37:52 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2005-01-12 18:37:52 +0000 |
commit | ffd5ad15de59fd73c3bf8156e2e3147998785a2f (patch) | |
tree | 0c2a6127acc681cbf16cccdda54f43a706c7c1a4 /mk/compiler/xlc.mk | |
parent | c39637ec68886b82602d21bf605730d8b258d89d (diff) | |
download | pkgsrc-ffd5ad15de59fd73c3bf8156e2e3147998785a2f.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/xlc.mk')
-rw-r--r-- | mk/compiler/xlc.mk | 23 |
1 files changed, 14 insertions, 9 deletions
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 |