aboutsummaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2014-10-20 07:33:00 +0000
committerJohn Marino <marino@FreeBSD.org>2014-10-20 07:33:00 +0000
commitf31e703dca3277284dc1e5818561ec5b6dadc5c5 (patch)
tree2b87631b34a8161d19608fce65dfa0bba250fff9 /Mk
parentafb0da498346b89be524881fd7e9dc870a95dd8b (diff)
downloadports-f31e703dca3277284dc1e5818561ec5b6dadc5c5.tar.gz
ports-f31e703dca3277284dc1e5818561ec5b6dadc5c5.zip
Notes
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Uses/alias.mk31
1 files changed, 31 insertions, 0 deletions
diff --git a/Mk/Uses/alias.mk b/Mk/Uses/alias.mk
new file mode 100644
index 000000000000..16104549d15b
--- /dev/null
+++ b/Mk/Uses/alias.mk
@@ -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