aboutsummaryrefslogtreecommitdiff
path: root/Mk/Uses/bison.mk
diff options
context:
space:
mode:
Diffstat (limited to 'Mk/Uses/bison.mk')
-rw-r--r--Mk/Uses/bison.mk19
1 files changed, 12 insertions, 7 deletions
diff --git a/Mk/Uses/bison.mk b/Mk/Uses/bison.mk
index a11b76e63b62..57e491fb5528 100644
--- a/Mk/Uses/bison.mk
+++ b/Mk/Uses/bison.mk
@@ -4,24 +4,29 @@
#
# MAINTAINER: portmgr@FreeBSD.org
#
+# Feature: bison
+# Usage: USES=bison or USES=bison:ARGS
+# Valid ARGS build (default, implicit), run, both
+#
+#
.if !defined(_INCLUDE_BISON_MK)
_INCLUDE_BISON_MK= yes
_BISON_DEPENDS= bison:${PORTSDIR}/devel/bison
.if !defined(bison_ARGS)
-BUILD_DEPENDS+= ${_BISON_DEPENDS}
-.else
+bison_ARGS=build
+.endif
+
.if ${bison_ARGS} == "build"
-BUILD_DEPENDS+= ${_BUILD_DEPENDS}
+BUILD_DEPENDS+= ${_BISON_DEPENDS}
.elif ${bison_ARGS} == "run"
-RUN_DEPENDS+= ${_BUILD_DEPENDS}
+RUN_DEPENDS+= ${_BISON_DEPENDS}
.elif ${bison_ARGS} == "both"
BUILD_DEPENDS+= ${_BISON_DEPENDS}
-RUN_DEPENDS+= ${_BUILD_DEPENDS}
+RUN_DEPENDS+= ${_BISON_DEPENDS}
.else
-IGNORE= Bad usage of USES= bison
-.endif
+IGNORE= USES=bison - invalid args: [${bison_ARGS}] specifed
.endif
.endif