Sync Mk with ports
[dports.git] / Mk / Uses / alias.mk
1 # $FreeBSD$
2 #
3 # Add __FreeBSD__ definition to CFLAGS
4 # Used by DPorts when masquerading as FreeBSD allows port to build without
5 # additional patches
6 #
7 # Feature:      alias
8 # Usage:        USES=alias or USES=alias:ARGS
9 # Valid ARGS:   9 (default), 10, 11
10 #
11 # MAINTAINER:   marino@FreeBSD.org
12
13 .if !defined(_INCLUDE_USES_ALIAS_MK)
14 _INCLUDE_USES_ALIAS_MK=    yes
15
16 .if ${OPSYS} != FreeBSD
17
18 .if empty(alias_ARGS)
19 CFLAGS+=        -D__FreeBSD__=9
20 .else
21 .  if ${alias_ARGS} == 9 || ${alias_ARGS} == 10 || ${alias_ARGS} == 11
22 CFLAGS+=        -D__FreeBSD__=${alias_ARGS}
23 .  else
24 IGNORE= invalid MAJOR RELEASE argument (${alias_ARGS}) for USES=alias
25 .  endif
26 .endif
27
28 .endif # OPSYS != FreeBSD
29
30 .endif