pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/tools Teach the tools framework about "byacc", whic...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f1927cdc5b26
branches:  trunk
changeset: 499330:f1927cdc5b26
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Tue Sep 20 03:50:18 2005 +0000

description:
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:

 mk/tools/replace.mk         |  22 +++++++++++++++++++++-
 mk/tools/tools.Darwin.mk    |   3 ++-
 mk/tools/tools.DragonFly.mk |   3 ++-
 mk/tools/tools.FreeBSD.mk   |   3 ++-
 mk/tools/tools.NetBSD.mk    |   3 ++-
 mk/tools/tools.OpenBSD.mk   |   3 ++-
 6 files changed, 31 insertions(+), 6 deletions(-)

diffs (131 lines):

diff -r 4dee28935931 -r f1927cdc5b26 mk/tools/replace.mk
--- a/mk/tools/replace.mk       Tue Sep 20 03:32:24 2005 +0000
+++ b/mk/tools/replace.mk       Tue Sep 20 03:50:18 2005 +0000
@@ -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 @@
 .  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 @@
 .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_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 -r 4dee28935931 -r f1927cdc5b26 mk/tools/tools.Darwin.mk
--- a/mk/tools/tools.Darwin.mk  Tue Sep 20 03:32:24 2005 +0000
+++ b/mk/tools/tools.Darwin.mk  Tue Sep 20 03:50:18 2005 +0000
@@ -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.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 -r 4dee28935931 -r f1927cdc5b26 mk/tools/tools.DragonFly.mk
--- a/mk/tools/tools.DragonFly.mk       Tue Sep 20 03:32:24 2005 +0000
+++ b/mk/tools/tools.DragonFly.mk       Tue Sep 20 03:50:18 2005 +0000
@@ -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 -r 4dee28935931 -r f1927cdc5b26 mk/tools/tools.FreeBSD.mk
--- a/mk/tools/tools.FreeBSD.mk Tue Sep 20 03:32:24 2005 +0000
+++ b/mk/tools/tools.FreeBSD.mk Tue Sep 20 03:50:18 2005 +0000
@@ -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 -r 4dee28935931 -r f1927cdc5b26 mk/tools/tools.NetBSD.mk
--- a/mk/tools/tools.NetBSD.mk  Tue Sep 20 03:32:24 2005 +0000
+++ b/mk/tools/tools.NetBSD.mk  Tue Sep 20 03:50:18 2005 +0000
@@ -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 -r 4dee28935931 -r f1927cdc5b26 mk/tools/tools.OpenBSD.mk
--- a/mk/tools/tools.OpenBSD.mk Tue Sep 20 03:32:24 2005 +0000
+++ b/mk/tools/tools.OpenBSD.mk Tue Sep 20 03:50:18 2005 +0000
@@ -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



Home | Main Index | Thread Index | Old Index