diff options
author | marino <marino@FreeBSD.org> | 2015-03-16 09:04:14 +0800 |
---|---|---|
committer | marino <marino@FreeBSD.org> | 2015-03-16 09:04:14 +0800 |
commit | 640a8700c82b4331498f4f5c16e240ff365c3210 (patch) | |
tree | 5b2b4df217b6da8c05f1b872ea1b44050f6fee23 | |
parent | 0232a8ded8bff4624816fb491bb777dac00c749a (diff) | |
download | freebsd-ports-gnome-640a8700c82b4331498f4f5c16e240ff365c3210.tar.gz freebsd-ports-gnome-640a8700c82b4331498f4f5c16e240ff365c3210.tar.zst freebsd-ports-gnome-640a8700c82b4331498f4f5c16e240ff365c3210.zip |
Mk/Uses/ada.mk: Add gcc5-based Ada compiler support
A new argument has been added to USES=ada, "5", which will select the
gcc5-aux compiler (gcc 5) instead of the gcc-aux compiler (gcc 4.9).
Additionally, it will check if ADA_DEFAULT is defined and equal to "5".
If that is the case, gcc5-aux will be used by default, even if no
arguments are defined. The use case is to define it in make.conf so that
all Ada ports are built with same compiler. This capability will be used
to confirm all Ada ports build correctly with gcc5-aux before the default
compiler is switched.
-rw-r--r-- | Mk/Uses/ada.mk | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/Mk/Uses/ada.mk b/Mk/Uses/ada.mk index 5a6a1fb20f05..fcbbb47791df 100644 --- a/Mk/Uses/ada.mk +++ b/Mk/Uses/ada.mk @@ -1,10 +1,12 @@ # $FreeBSD$ # # Establish Ada-capable compiler as a build dependency +# To change default compiler, define ADA_DEFAULT in make.conf to 5 +# Note that gcc47-aux is being removed soon, so 47 is not a legal default # # Feature: ada # Usage: USES=ada -# Valid ARGS: 47 +# Valid ARGS: 47, 5 # # MAINTAINER: marino@FreeBSD.org @@ -13,17 +15,22 @@ _INCLUDE_USES_ADA_MK= yes CC= ada -. if ${ada_ARGS} == 47 -BUILD_DEPENDS+= ${LOCALBASE}/gcc47-aux/bin/ada:${PORTSDIR}/lang/gcc47-aux -MAKE_ENV+= PATH=${LOCALBASE}/gcc47-aux/bin:${PATH} -CONFIGURE_ENV+= PATH=${LOCALBASE}/gcc47-aux/bin:${PATH} +. if ${ada_ARGS:M47} +ADAXX= gcc47 +. elif ${ada_ARGS:M5} +ADAXX= gcc5 . else -BUILD_DEPENDS+= ${LOCALBASE}/gcc-aux/bin/ada:${PORTSDIR}/lang/gcc-aux -MAKE_ENV+= PATH=${LOCALBASE}/gcc-aux/bin:${PATH} -CONFIGURE_ENV+= PATH=${LOCALBASE}/gcc-aux/bin:${PATH} +. if defined(ADA_DEFAULT) && ${ADA_DEFAULT} == 5 +ADAXX= gcc5 +. else +ADAXX= gcc +. endif . endif -MAKE_ENV+= ADA_PROJECT_PATH=${LOCALBASE}/lib/gnat -CONFIGURE_ENV+= ADA_PROJECT_PATH=${LOCALBASE}/lib/gnat +BUILD_DEPENDS+= ${LOCALBASE}/gcc47-aux/bin/ada:${PORTSDIR}/lang/${ADAXX}-aux +MAKE_ENV+= PATH=${LOCALBASE}/${ADAXX}-aux/bin:${PATH} \ + ADA_PROJECT_PATH=${LOCALBASE}/lib/gnat +CONFIGURE_ENV+= PATH=${LOCALBASE}/${ADAXX}-aux/bin:${PATH} \ + ADA_PROJECT_PATH=${LOCALBASE}/lib/gnat .endif |