diff options
author | jlam <jlam@pkgsrc.org> | 2004-02-02 10:03:46 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-02-02 10:03:46 +0000 |
commit | ebbc2d91843f9094378b949fd579b0d19d9031ad (patch) | |
tree | e2e3af98911ed47bc54396ea26ce2200bee342f5 /mk/compiler/sunpro.mk | |
parent | 7005f973eada7c97b27c80412ed94ed20c29cc2a (diff) | |
download | pkgsrc-ebbc2d91843f9094378b949fd579b0d19d9031ad.tar.gz |
Support a new variable in package Makefiles:
USE_LANGUAGES
Lists the languages used in the source code of the package,
and is used to determine the correct compilers to install.
Valid values are: c, c++, fortran, java, objc. The default
is "c".
Packages that don't need any compilers and set this variable to an
empty value, e.g. "USE_LANGUAGES=".
This can probably be combined in some smart way with setting
USE_GCC_SHLIBS and USE_FORTRAN automatically.
Diffstat (limited to 'mk/compiler/sunpro.mk')
-rw-r--r-- | mk/compiler/sunpro.mk | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/mk/compiler/sunpro.mk b/mk/compiler/sunpro.mk index c34d0eefc7e..e7b9f839918 100644 --- a/mk/compiler/sunpro.mk +++ b/mk/compiler/sunpro.mk @@ -1,4 +1,4 @@ -# $NetBSD: sunpro.mk,v 1.2 2004/02/01 00:57:26 jlam Exp $ +# $NetBSD: sunpro.mk,v 1.3 2004/02/02 10:03:46 jlam Exp $ .if !defined(COMPILER_SUNPRO_MK) COMPILER_SUNPRO_MK= defined @@ -6,9 +6,23 @@ COMPILER_SUNPRO_MK= defined SUNWSPROBASE?= /opt/SUNWspro PATH:= ${SUNWSPROBASE}/bin:${PATH} +# 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.sunpro= c c++ +_LANGUAGES.sunpro= # empty +.for _lang_ in ${USE_LANGUAGES} +_LANGUAGES.sunpro= ${LANGUAGES.sunpro:M${_lang_}} +.endfor + +.if !empty(_LANGUAGES.sunpro:Mc) CC= ${SUNWSPROBASE}/bin/cc CPP= ${SUNWSPROBASE}/bin/cc -E +.endif +.if !empty(_LANGUAGES.sunpro:Mc++) CXX= ${SUNWSPROBASE}/bin/CC +.endif _COMPILER_LD_FLAG= # empty |