summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2005-09-20 03:50:18 +0000
committerjlam <jlam@pkgsrc.org>2005-09-20 03:50:18 +0000
commit1403b1ed138f8ea3fa4bd004a85f832d5f616fe5 (patch)
treebcb27cab953ecbedcbfb55be669d4d34bac1d549 /mk
parent8b11764a81ad1d21f1de28225ddb0788c83407bf (diff)
downloadpkgsrc-1403b1ed138f8ea3fa4bd004a85f832d5f616fe5.tar.gz
Teach the tools framework about "byacc", which is a Berkeley-compatible
YACC. This should be used by packages that require NOT using bison (maybe because bison can't handle the .y file) but still need a yacc.
Diffstat (limited to 'mk')
-rw-r--r--mk/tools/replace.mk22
-rw-r--r--mk/tools/tools.Darwin.mk3
-rw-r--r--mk/tools/tools.DragonFly.mk3
-rw-r--r--mk/tools/tools.FreeBSD.mk3
-rw-r--r--mk/tools/tools.NetBSD.mk3
-rw-r--r--mk/tools/tools.OpenBSD.mk3
6 files changed, 31 insertions, 6 deletions
diff --git a/mk/tools/replace.mk b/mk/tools/replace.mk
index f6186c0b418..fdafc58c2ed 100644
--- a/mk/tools/replace.mk
+++ b/mk/tools/replace.mk
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.125 2005/08/10 20:56:20 jlam Exp $
+# $NetBSD: replace.mk,v 1.126 2005/09/20 03:50:18 jlam Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -103,6 +103,9 @@ _USE_TOOLS+= ${_t_}
. if !empty(_USE_TOOLS:Mbison-yacc) # bison-yacc > yacc
_USE_TOOLS:= ${_USE_TOOLS:Nyacc}
. endif
+. if !empty(_USE_TOOLS:Mbyacc) # byacc > yacc
+_USE_TOOLS:= ${_USE_TOOLS:Nyacc}
+. endif
. if !empty(_USE_TOOLS:Mflex) # flex > lex
_USE_TOOLS:= ${_USE_TOOLS:Nlex}
. endif
@@ -118,6 +121,11 @@ _USE_TOOLS:= ${_USE_TOOLS:Nsed}
.endif
MAKEVARS+= _USE_TOOLS
+# Catch conflicting tools.
+.if !empty(_USE_TOOLS:Mbison) && !empty(_USE_TOOLS:Mbyacc)
+PKG_FAIL_REASON+= "\`\`bison'' and \`\`byacc'' conflict in USE_TOOLS."
+.endif
+
######################################################################
# Set the type of dependency requested for the tool. The type of
@@ -284,6 +292,18 @@ TOOLS_CMD.bison-yacc= ${TOOLS_DIR}/bin/yacc
TOOLS_VALUE_GNU.bison-yacc= ${TOOLS_CMDLINE.bison-yacc}
.endif
+.if !defined(TOOLS_IGNORE.byacc) && !empty(_USE_TOOLS:Mbyacc)
+. if !empty(PKGPATH:Mdevel/byacc)
+MAKEFLAGS+= TOOLS_IGNORE.byacc=
+. elif !empty(_TOOLS_USE_PKGSRC.byacc:M[yY][eE][sS])
+TOOLS_DEPENDS.byacc?= byacc>=20040328:../../devel/byacc
+TOOLS_CREATE+= byacc
+TOOLS_FIND_PREFIX+= TOOLS_PREFIX.byacc=byacc
+TOOLS_PATH.byacc= ${TOOLS_PREFIX.byacc}/bin/yacc
+TOOLS_CMD.byacc= ${TOOLS_DIR}/bin/yacc
+. endif
+.endif
+
.if !defined(TOOLS_IGNORE.bzcat) && !empty(_USE_TOOLS:Mbzcat)
. if !empty(PKGPATH:Marchivers/bzip2)
MAKEFLAGS+= TOOLS_IGNORE.bzcat=
diff --git a/mk/tools/tools.Darwin.mk b/mk/tools/tools.Darwin.mk
index 43c6aa7a01c..1ffd5f9b5ae 100644
--- a/mk/tools/tools.Darwin.mk
+++ b/mk/tools/tools.Darwin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: tools.Darwin.mk,v 1.18 2005/07/07 21:29:11 jlam Exp $
+# $NetBSD: tools.Darwin.mk,v 1.19 2005/09/20 03:50:19 jlam Exp $
#
# System-supplied tools for the Darwin (Mac OS X) operating system.
@@ -6,6 +6,7 @@ TOOLS_PLATFORM.[?= [ # shell builtin
TOOLS_PLATFORM.awk?= /usr/bin/awk
TOOLS_PLATFORM.basename?= /usr/bin/basename
TOOLS_PLATFORM.bash?= /bin/bash
+TOOLS_PLATFORM.byacc?= /usr/bin/yacc
.if exists(/usr/bin/bzcat)
TOOLS_PLATFORM.bzcat?= /usr/bin/bzcat
.endif
diff --git a/mk/tools/tools.DragonFly.mk b/mk/tools/tools.DragonFly.mk
index 4184931f9ae..db8d0334253 100644
--- a/mk/tools/tools.DragonFly.mk
+++ b/mk/tools/tools.DragonFly.mk
@@ -1,10 +1,11 @@
-# $NetBSD: tools.DragonFly.mk,v 1.17 2005/06/24 20:59:59 jlam Exp $
+# $NetBSD: tools.DragonFly.mk,v 1.18 2005/09/20 03:50:19 jlam Exp $
#
# System-supplied tools for the DragonFly operating system.
TOOLS_PLATFORM.[?= /bin/[
TOOLS_PLATFORM.awk?= /usr/bin/awk
TOOLS_PLATFORM.basename?= /usr/bin/basename
+TOOLS_PLATFORM.byacc?= /usr/bin/yacc
TOOLS_PLATFORM.cat?= /bin/cat
TOOLS_PLATFORM.bzcat?= /usr/bin/bzcat
TOOLS_PLATFORM.chgrp?= /usr/bin/chgrp
diff --git a/mk/tools/tools.FreeBSD.mk b/mk/tools/tools.FreeBSD.mk
index 9eaccb366db..7a5d0962299 100644
--- a/mk/tools/tools.FreeBSD.mk
+++ b/mk/tools/tools.FreeBSD.mk
@@ -1,10 +1,11 @@
-# $NetBSD: tools.FreeBSD.mk,v 1.19 2005/08/10 02:57:32 jlam Exp $
+# $NetBSD: tools.FreeBSD.mk,v 1.20 2005/09/20 03:50:19 jlam Exp $
#
# System-supplied tools for the FreeBSD operating system.
TOOLS_PLATFORM.[?= [ # shell builtin
TOOLS_PLATFORM.awk?= /usr/bin/awk
TOOLS_PLATFORM.basename?= /usr/bin/basename
+TOOLS_PLATFORM.byacc?= /usr/bin/yacc
.if exists(/usr/bin/bzcat)
TOOLS_PLATFORM.bzcat?= /usr/bin/bzcat
.endif
diff --git a/mk/tools/tools.NetBSD.mk b/mk/tools/tools.NetBSD.mk
index 3b9cbdc0ce8..e3f5ee2a297 100644
--- a/mk/tools/tools.NetBSD.mk
+++ b/mk/tools/tools.NetBSD.mk
@@ -1,10 +1,11 @@
-# $NetBSD: tools.NetBSD.mk,v 1.18 2005/06/24 20:59:59 jlam Exp $
+# $NetBSD: tools.NetBSD.mk,v 1.19 2005/09/20 03:50:19 jlam Exp $
#
# System-supplied tools for the NetBSD operating system.
TOOLS_PLATFORM.[?= [ # shell builtin
TOOLS_PLATFORM.awk?= /usr/bin/awk
TOOLS_PLATFORM.basename?= /usr/bin/basename
+TOOLS_PLATFORM.byacc?= /usr/bin/yacc
.if exists(/usr/bin/bzcat)
TOOLS_PLATFORM.bzcat?= /usr/bin/bzcat
.endif
diff --git a/mk/tools/tools.OpenBSD.mk b/mk/tools/tools.OpenBSD.mk
index ca41c335d1c..fd7509ed971 100644
--- a/mk/tools/tools.OpenBSD.mk
+++ b/mk/tools/tools.OpenBSD.mk
@@ -1,10 +1,11 @@
-# $NetBSD: tools.OpenBSD.mk,v 1.17 2005/06/24 20:59:59 jlam Exp $
+# $NetBSD: tools.OpenBSD.mk,v 1.18 2005/09/20 03:50:19 jlam Exp $
#
# System-supplied tools for the OpenBSD operating system.
TOOLS_PLATFORM.[?= [ # shell builtin
TOOLS_PLATFORM.awk?= /usr/bin/awk
TOOLS_PLATFORM.basename?= /usr/bin/basename
+TOOLS_PLATFORM.byacc?= /usr/bin/yacc
TOOLS_PLATFORM.cat?= /bin/cat
.if exists(/bin/chgrp)
TOOLS_PLATFORM.chgrp?= /bin/chgrp