- Add USE_CSTD flag that adds --std=value to CFLAGS

PR:		ports/135083
Submitted by:	ed

- Separate MAKE_JOBS_NUMBER from _MAKE_JOBS, so it can be used in
  individual ports

PR:		ports/134977
Submitted by:	David Naylor <naylor.b.david@gmail.com>
This commit is contained in:
Pav Lucistnik 2009-06-03 21:50:50 +00:00
parent e7370bdd98
commit ab5c91839f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=235136

View file

@ -308,6 +308,7 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# the regular expression.
# USE_GCC - If set, this port requires this version of gcc, either in
# the system or installed from a port.
# USE_CSTD - Override the default C language standard (gnu89, gnu99)
# USE_GMAKE - If set, this port uses gmake.
# GMAKE - Set to path of GNU make if not in $PATH.
# Default: gmake
@ -2180,16 +2181,17 @@ CFLAGS+= -fno-strict-aliasing
.endif
.endif
.if defined(USE_CSTD)
CFLAGS:= ${CFLAGS:N-std=*} -std=${USE_CSTD}
.endif
# Multiple make jobs support
.if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE)
_MAKE_JOBS= #
.else
.if defined(MAKE_JOBS_SAFE) || defined(FORCE_MAKE_JOBS)
.if defined(MAKE_JOBS_NUMBER)
MAKE_JOBS_NUMBER?= `${SYSCTL} -n kern.smp.cpus`
_MAKE_JOBS= -j${MAKE_JOBS_NUMBER}
.else
_MAKE_JOBS= -j`${SYSCTL} -n kern.smp.cpus`
.endif
.if defined(FORCE_MAKE_JOBS)
BUILD_FAIL_MESSAGE+= "You have chosen to use multiple make jobs (parallelization) for all ports. This port was not tested for this setting. Please remove FORCE_MAKE_JOBS and retry the build before reporting the failure to the maintainer."
.endif