From ffd5ad15de59fd73c3bf8156e2e3147998785a2f Mon Sep 17 00:00:00 2001 From: jlam Date: Wed, 12 Jan 2005 18:37:52 +0000 Subject: Rearrange how LANGUAGES. 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. --- mk/compiler/xlc.mk | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'mk/compiler/xlc.mk') 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. is the list of supported languages by the compiler. -# _LANGUAGES. is ${LANGUAGES.} restricted to the ones -# requested by the package in USE_LANGUAGES. +# LANGUAGES. 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. is ${LANGUAGES.} 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 -- cgit v1.2.3