Changeset View
Changeset View
Standalone View
Standalone View
Mk/bsd.port.mk
Show First 20 Lines • Show All 1,180 Lines • ▼ Show 20 Lines | |||||
ARCH!= ${UNAME} -p | ARCH!= ${UNAME} -p | ||||
.endif | .endif | ||||
# Get the operating system type | # Get the operating system type | ||||
.if !defined(OPSYS) | .if !defined(OPSYS) | ||||
OPSYS!= ${UNAME} -s | OPSYS!= ${UNAME} -s | ||||
.endif | .endif | ||||
UNAMER!=${UNAME} -r | |||||
# Get the operating system revision | # Get the operating system revision | ||||
.if !defined(OSREL) | OSREL?= ${UNAMER:C/-.*//} | ||||
OSREL!= ${UNAME} -r | ${SED} -e 's/[-(].*//' | |||||
.endif | |||||
# Get __FreeBSD_version | # Get __FreeBSD_version | ||||
.if !defined(OSVERSION) | .if !defined(OSVERSION) | ||||
.if exists(/usr/include/sys/param.h) | .if exists(/usr/include/sys/param.h) | ||||
OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h | OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h | ||||
.elif exists(${SRC_BASE}/sys/sys/param.h) | .elif exists(${SRC_BASE}/sys/sys/param.h) | ||||
OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < ${SRC_BASE}/sys/sys/param.h | OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < ${SRC_BASE}/sys/sys/param.h | ||||
.else | .else | ||||
OSVERSION!= ${SYSCTL} -n kern.osreldate | .error Unable to determine OS version. Either define OSVERSION, install /usr/include/sys/param.h or define SRC_BASE. | ||||
bapt: This should be IGNORE to be consistent (I know the IGNORE variable sucks)
Or .error should be a… | |||||
bdreweryAuthorUnsubmitted Not Done Inline ActionsIGNORE does not work here. What is the problem with .error? bdrewery: IGNORE does not work here. What is the problem with .error? | |||||
baptUnsubmitted Not Done Inline Actions.error is probably ok bapt: .error is probably ok | |||||
.endif | .endif | ||||
.endif | |||||
# Convert OSVERSION to major release number | |||||
_OSVERSION_MAJOR= ${OSVERSION:C/([0-9]?[0-9])([0-9][0-9])[0-9]{3}/\1/} | |||||
Not Done Inline Actions${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} is simpler and does the same? antoine: ${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} is simpler and does the same? | |||||
# Sanity checks for chroot/jail building. | |||||
.if ${_OSVERSION_MAJOR} != ${UNAMER:R} | |||||
baptUnsubmitted Not Done Inline ActionsThat will fail in case of the 11.1.1 release (which already happened in the past aka 5.2.1) bapt: That will fail in case of the 11.1.1 release (which already happened in the past aka 5.2.1) | |||||
bdreweryAuthorUnsubmitted Not Done Inline ActionsI don't think so. The intent is to only grab the first 2 numbers since we have ABI stability on those. bdrewery: I don't think so. The intent is to only grab the first 2 numbers since we have ABI stability on… | |||||
.error UNAME_r (${UNAMER}) and OSVERSION (${OSVERSION}) do not agree on major version number. | |||||
.elif ${_OSVERSION_MAJOR} != ${OSREL:R} | |||||
.error OSREL (${OSREL}) and OSVERSION (${OSVERSION}) do not agree on major version number. | |||||
.endif | .endif | ||||
# Enable new xorg for FreeBSD versions after Radeon KMS was imported unless | # Enable new xorg for FreeBSD versions after Radeon KMS was imported unless | ||||
# WITHOUT_NEW_XORG is set. | # WITHOUT_NEW_XORG is set. | ||||
.if (${OSVERSION} >= 902510 && ${OSVERSION} < 1000000) || ${OSVERSION} >= 1000704 | .if (${OSVERSION} >= 902510 && ${OSVERSION} < 1000000) || ${OSVERSION} >= 1000704 | ||||
. if !defined(WITHOUT_NEW_XORG) | . if !defined(WITHOUT_NEW_XORG) | ||||
WITH_NEW_XORG?= yes | WITH_NEW_XORG?= yes | ||||
. else | . else | ||||
▲ Show 20 Lines • Show All 4,912 Lines • Show Last 20 Lines |
This should be IGNORE to be consistent (I know the IGNORE variable sucks)
Or .error should be a propagated usage