2013-03-08 11:32:11 +00:00
|
|
|
# handle dependency on the bison port
|
|
|
|
#
|
2013-03-08 15:04:18 +00:00
|
|
|
# Feature: bison
|
|
|
|
# Usage: USES=bison or USES=bison:ARGS
|
2020-03-10 16:05:11 +00:00
|
|
|
# Valid ARGS: build (default, implicit), run, both, alias, wrappers
|
|
|
|
#
|
|
|
|
# 'alias' will automatically create a BINARY_ALIAS to use base
|
|
|
|
# byacc invoked as bison
|
|
|
|
# 'wrapper' will automatically create BINARY_WRAPPER to use base
|
|
|
|
# byacc with a wrapper to mimic a bit more bison
|
2013-03-08 15:04:18 +00:00
|
|
|
#
|
2014-03-15 10:31:54 +00:00
|
|
|
# MAINTAINER: portmgr@FreeBSD.org
|
|
|
|
|
2013-03-11 06:43:13 +00:00
|
|
|
.if !defined(_INCLUDE_USES_BISON_MK)
|
|
|
|
_INCLUDE_USES_BISON_MK= yes
|
2013-03-08 11:32:11 +00:00
|
|
|
|
2016-03-27 01:23:25 +00:00
|
|
|
_BISON_DEPENDS= bison:devel/bison
|
2013-03-08 11:32:11 +00:00
|
|
|
|
2014-09-28 16:36:31 +00:00
|
|
|
.if empty(bison_ARGS)
|
2013-03-08 22:17:53 +00:00
|
|
|
bison_ARGS= build
|
2013-03-08 15:04:18 +00:00
|
|
|
.endif
|
|
|
|
|
2013-03-08 11:32:11 +00:00
|
|
|
.if ${bison_ARGS} == "build"
|
2013-03-08 15:04:18 +00:00
|
|
|
BUILD_DEPENDS+= ${_BISON_DEPENDS}
|
2013-03-08 11:32:11 +00:00
|
|
|
.elif ${bison_ARGS} == "run"
|
2013-03-08 15:04:18 +00:00
|
|
|
RUN_DEPENDS+= ${_BISON_DEPENDS}
|
2013-03-08 11:32:11 +00:00
|
|
|
.elif ${bison_ARGS} == "both"
|
|
|
|
BUILD_DEPENDS+= ${_BISON_DEPENDS}
|
2013-03-08 15:04:18 +00:00
|
|
|
RUN_DEPENDS+= ${_BISON_DEPENDS}
|
2019-10-02 19:24:18 +00:00
|
|
|
.elif ${bison_ARGS} == "alias"
|
|
|
|
BINARY_ALIAS+= bison=byacc
|
2020-03-10 14:20:25 +00:00
|
|
|
.elif ${bison_ARGS} == "wrapper"
|
|
|
|
BINARY_WRAPPERS+= bison
|
2013-03-08 11:32:11 +00:00
|
|
|
.else
|
2013-11-19 23:24:20 +00:00
|
|
|
IGNORE= USES=bison - invalid args: [${bison_ARGS}] specified
|
2013-03-08 11:32:11 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.endif
|