fe837ee6c6
- Loop over USES twice, once to define all *_ARGS variables and once to include Uses/*.mk. This allows all Uses/*.mk to examine arguments given to other USES entries. - Always define *_ARGS (possibly empty) and replace commas with spaces. Similar for _USES_POST. Adjust all Uses/*.mk: - defined(u_ARGS) becomes !empty(u_ARGS) - Eliminate helper variables like _*_ARGS=${*_ARGS:C/,/ /g} - Some Uses/*.mk used ":" as argument separator instead of ",", but no port used this form - Uses/cran.mk: remove unused variable VALID_ARGS and USES+=fortran which has no effect - Uses/twisted.mk: simplify handling of the case where neither "build" nor "run" arguments have been specified PR: 193931 Exp-run by: antoine Approved by: portmgr (antoine)
31 lines
661 B
Makefile
31 lines
661 B
Makefile
# $FreeBSD$
|
|
#
|
|
# handle dependency on the bison port
|
|
#
|
|
# Feature: bison
|
|
# Usage: USES=bison or USES=bison:ARGS
|
|
# Valid ARGS: build (default, implicit), run, both
|
|
#
|
|
# MAINTAINER: portmgr@FreeBSD.org
|
|
|
|
.if !defined(_INCLUDE_USES_BISON_MK)
|
|
_INCLUDE_USES_BISON_MK= yes
|
|
|
|
_BISON_DEPENDS= bison:${PORTSDIR}/devel/bison
|
|
|
|
.if empty(bison_ARGS)
|
|
bison_ARGS= build
|
|
.endif
|
|
|
|
.if ${bison_ARGS} == "build"
|
|
BUILD_DEPENDS+= ${_BISON_DEPENDS}
|
|
.elif ${bison_ARGS} == "run"
|
|
RUN_DEPENDS+= ${_BISON_DEPENDS}
|
|
.elif ${bison_ARGS} == "both"
|
|
BUILD_DEPENDS+= ${_BISON_DEPENDS}
|
|
RUN_DEPENDS+= ${_BISON_DEPENDS}
|
|
.else
|
|
IGNORE= USES=bison - invalid args: [${bison_ARGS}] specified
|
|
.endif
|
|
|
|
.endif
|