Subject: Re: build depends on bison or yacc?
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 07/30/2003 04:51:19
On Wed, 30 Jul 2003, Julio M. Merino Vidal wrote:
> Aside from this, it may be interesting to also define the YACC variable in
> the defs.*.mk files. On some systems, we can know beforehand where will it
> be, right?
Yes, that should be fine. I don't know which ones all include a yacc or
bison. I have seen some Linux distros include a bison by default. But I
don't know.
The yacc.mk shouldn't set YACC is already set:
# $NetBSD$
#
# This Makefile fragment is included by packages that need a yacc
# at build time.
.if !defined(YACC_MK)
YACC_MK= # defined
.include "../../mk/bsd.prefs.mk"
.if !defined(YACC)
.if exists(/usr/bin/yacc)
YACC= /usr/bin/yacc
.elif exists(/usr/bin/bison)
YACC= /usr/bin/bison -y
.else
BUILD_DEPENDS+= bison-[0-9]*:../../devel/bison
YACC= ${LOCALBASE}/bin/bison -y
.endif
.endif # YACC not defined
.endif # YACC_MK
Also, I am thinking about a YACC_TYPE (to be defined in
bsd.pkg.defaults.mk or mk.conf). If it is "bison" (the default at first),
then check for bison or then build depends on bison. If YACC_TYPE is
"byacc", then check for yacc or byacc or BUILD_DEPENDS on my byacc.
Jeremy C. Reed
http://bsd.reedmedia.net/