mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-25 04:43:33 +00:00
Add Mk/Uses/alias.mk
When on used FreeBSD, this tool doesn't do anything. However, when used on DragonFly, it will define __FreeBSD__ appropriately in CFLAGS which allows the port to build with minimal or no extra patches. Differential Revision: https://reviews.freebsd.org/D950 Reviewed by: portmgr Approved by: bapt (portmgr)
This commit is contained in:
parent
afb0da4983
commit
f31e703dca
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=371239
31
Mk/Uses/alias.mk
Normal file
31
Mk/Uses/alias.mk
Normal file
@ -0,0 +1,31 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
# Add __FreeSBD__ definition to CFLAGS
|
||||
# Used by DPorts when masquerading as FreeBSD allows port to build without
|
||||
# additional patches
|
||||
#
|
||||
# Feature: alias
|
||||
# Usage: USES=alias or USES=alias:ARGS
|
||||
# Valid ARGS: 8, 9 (default), 10, 11
|
||||
#
|
||||
# MAINTAINER: marino@FreeBSD.org
|
||||
|
||||
.if !defined(_INCLUDE_USES_ALIAS_MK)
|
||||
_INCLUDE_USES_ALIAS_MK= yes
|
||||
|
||||
.if ${OPSYS} == DragonFly
|
||||
|
||||
.if empty(alias_ARGS)
|
||||
CFLAGS+= -D__FreeBSD__=9
|
||||
.else
|
||||
. if ${alias_ARGS} == 8 || ${alias_ARGS} == 10 \
|
||||
|| ${alias_ARGS} == 9 || ${alias_ARGS} == 11
|
||||
CFLAGS+= -D__FreeBSD__=${alias_ARGS}
|
||||
. else
|
||||
IGNORE= invalid MAJOR RELEASE argument (${alias_ARGS}) for USES=alias
|
||||
. endif
|
||||
.endif
|
||||
|
||||
.endif # OPSYS == DragonFly
|
||||
|
||||
.endif
|
Loading…
Reference in New Issue
Block a user