Changeset View
Changeset View
Standalone View
Standalone View
Mk/Uses/alias.mk
# Add __FreeBSD__ definition to CFLAGS | # Add __FreeBSD__ definition to CFLAGS | ||||
# Used by DPorts when masquerading as FreeBSD allows port to build without | # Used by DPorts when masquerading as FreeBSD allows port to build without | ||||
# additional patches | # additional patches | ||||
# | # | ||||
# Feature: alias | # Feature: alias | ||||
# Usage: USES=alias or USES=alias:ARGS | # Usage: USES=alias or USES=alias:ARGS | ||||
# Valid ARGS: 9 (default), 10, 11 | # Valid ARGS: 9 (default), 10, 11 | ||||
# | # | ||||
# MAINTAINER: ports@FreeBSD.org | # MAINTAINER: ports@FreeBSD.org | ||||
.if !defined(_INCLUDE_USES_ALIAS_MK) | .if !defined(_INCLUDE_USES_ALIAS_MK) | ||||
_INCLUDE_USES_ALIAS_MK= yes | _INCLUDE_USES_ALIAS_MK= yes | ||||
.if ${OPSYS} != FreeBSD | . if ${OPSYS} != FreeBSD | ||||
.if empty(alias_ARGS) | . if empty(alias_ARGS) | ||||
CFLAGS+= -D__FreeBSD__=9 | CFLAGS+= -D__FreeBSD__=9 | ||||
.else | . else | ||||
. if ${alias_ARGS} == 9 || ${alias_ARGS} == 10 || ${alias_ARGS} == 11 | . if ${alias_ARGS} == 9 || ${alias_ARGS} == 10 || ${alias_ARGS} == 11 | ||||
CFLAGS+= -D__FreeBSD__=${alias_ARGS} | CFLAGS+= -D__FreeBSD__=${alias_ARGS} | ||||
. else | . else | ||||
IGNORE= invalid MAJOR RELEASE argument (${alias_ARGS}) for USES=alias | IGNORE= invalid MAJOR RELEASE argument (${alias_ARGS}) for USES=alias | ||||
. endif | . endif | ||||
.endif | . endif | ||||
.endif # OPSYS != FreeBSD | . endif # OPSYS != FreeBSD | ||||
.endif | .endif |