yacc/bison
Markus Weissmann
mww at macports.org
Wed Apr 8 00:33:16 PDT 2009
On 8 Apr 2009, at 06:45, Ryan Schmidt wrote:
> On Apr 7, 2009, at 09:59, Jeremy Lavergne wrote:
>
>> I have a port that is using yacc. Like g++/gcc, it can use the
>> system ones without a problem. Should this not be marked as a
>> dependency then?
>
> I suggest declaring a dependency on the bison port. I do this in my
> pure/pure-devel ports which need bison. This way, you won't be
> confused later when differences arise between the system bison and
> the MacPorts bison; you can be assured all users are using the
> MacPorts bison.
>
>> If not, what ports provide bin/yacc besides bison +yacc? It is my
>> understanding we can't dictate variants yet, so I'd like a better
>> solution than printing a ui_msg.
>
> True. But:
>
> The +yacc variant doesn't make bison take longer to build [1]. It
> doesn't add any dependencies. All it does is install a static
> library liby.a and install a wrapper script "yacc" which calls
> "bison -y".
>
How about setting YACC='bison -y' ? Or does the port require the
library as well?
> The +yacc variant was added to the bison port in r10216 when it was
> updated to version 2.0. No explanation why it was a variant instead
> of always on.
>
If in doubt, I try to mimic the FreeBSD ports -- thats tried and
tested already for the "closest relative" OS. I recall there were some
ports that failed due to expecting "bison1" behind 'yacc'..
> This sounds like a great example of where we should remove the
> variant and have bison always include yacc support.
>
Thinking about enabling 'yacc' by default, there are (at least) 3
candidates to claim the 'yacc' executable: bison1, bison (version 2),
byaccj and bisoncpp [1];
Another solution would be to install the yacc/bison2 executable as
'yacc2' or as 'yacc' in $prefix/lib/bison/bin -- thought?
Regards,
-Markus
[1] http://bisoncpp.sourceforge.net/
--
Markus W. Weissmann, M. Sc.
http://www.mweissmann.de/
More information about the macports-dev
mailing list