aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.port.mk
diff options
context:
space:
mode:
authorAde Lovett <ade@FreeBSD.org>2007-10-17 10:13:01 +0000
committerAde Lovett <ade@FreeBSD.org>2007-10-17 10:13:01 +0000
commitdbd39ca660cafa3d1f2acebf05c86bf17a035ff8 (patch)
tree5d14b5c3a50461b8a6096fcc383dc2181cb624b7 /Mk/bsd.port.mk
parent74313458803db4f95050b550b038051b82c96b67 (diff)
downloadports-dbd39ca660cafa3d1f2acebf05c86bf17a035ff8.tar.gz
ports-dbd39ca660cafa3d1f2acebf05c86bf17a035ff8.zip
Migration from bison 1.x to 2.x
PR: 117086 Tested by: -exp runs
Notes
Notes: svn path=/head/; revision=201613
Diffstat (limited to 'Mk/bsd.port.mk')
-rw-r--r--Mk/bsd.port.mk26
1 files changed, 24 insertions, 2 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 5d066c754298..3aca1db9fe58 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -362,7 +362,10 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# - If set, this port uses the GNU version of the ghostscript
# software instead of the GPL version, which is used otherwise.
##
-# USE_BISON - If set, this port uses bison for building.
+# USE_BISON - Implies that the port uses bison in one way or another:
+# 'yes' (backwards compatibility) - use bison for building
+# new features: 'build', 'run', 'both', implying build,
+# runtime, and both build/run dependencies
##
# USE_IMAKE - If set, this port uses imake. Implies USE_X_PREFIX.
# XMKMF - Set to path of `xmkmf' if not in $PATH
@@ -1926,7 +1929,26 @@ RUN_DEPENDS+= ${_GL_${_component}_RUN_DEPENDS}
.endif
.if defined(USE_BISON)
-BUILD_DEPENDS+= bison:${PORTSDIR}/devel/bison
+_BISON_DEPENDS= bison:${PORTSDIR}/devel/bison
+
+# XXX: backwards compatibility
+. if ${USE_BISON:L} == "yes"
+USE_BISON= build
+pre-everything::
+ @${ECHO_MSG} "WARNING: USE_BISON=yes deprecated, use build/run/both"
+. endif
+
+. if ${USE_BISON:L} == "build"
+BUILD_DEPENDS+= ${_BISON_DEPENDS}
+. elif ${USE_BISON:L} == "run"
+RUN_DEPENDS+= ${_BISON_DEPENDS}
+. elif ${USE_BISON:L} == "both"
+BUILD_DEPENDS+= ${_BISON_DEPENDS}
+RUN_DEPENDS+= ${_BISON_DEPENDS}
+. else
+IGNORE= uses unknown USE_BISON construct
+. endif
+
.endif
.if !defined(_PERL_REFACTORING_COMPLETE)