Index: head/Mk/Uses/bison.mk =================================================================== --- head/Mk/Uses/bison.mk +++ head/Mk/Uses/bison.mk @@ -26,6 +26,8 @@ RUN_DEPENDS+= ${_BISON_DEPENDS} .elif ${bison_ARGS} == "alias" BINARY_ALIAS+= bison=byacc +.elif ${bison_ARGS} == "wrapper" +BINARY_WRAPPERS+= bison .else IGNORE= USES=bison - invalid args: [${bison_ARGS}] specified .endif Index: head/Mk/Wrappers/bison =================================================================== --- head/Mk/Wrappers/bison +++ head/Mk/Wrappers/bison @@ -0,0 +1,19 @@ +#!/bin/sh +# +# $FreeBSD$ + +# This wrappers allows to deals build system calling bison with certain long option +# and messing with arguments orders + +case " $@ " in +*" --version "*) echo "bison (GNU bison 3.5.2)" ; exit 0 ;; +esac + +for arg; do + case "$arg" in + *.y) inputfile="$arg" ;; + --verbose|-v) ;; # ignore + *) args="$args $arg" ;; + esac +done +exec byacc -L $args $inputfile