From 74553c98a2968f7b85ee0b4619890b8da1303b82 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Thu, 8 Jan 2009 09:41:21 +0100 Subject: [PATCH] Fix grep portability issues. Grep on Solaris does not support -q. Reported by Summum Bonum. * NEWS: Add a stub for 2.4.2. * THANKS: Add Summum Bonum. * tests/atlocal.in (EGREP): New. (CC, CXX, XSLTPROC): Make it possible to override them via envvars. * tests/java.at: Use $EGREP instead of egrep. Use AT_CHECK's ignore instead of grep's -q. --- ChangeLog | 14 ++++++++++++++ NEWS | 10 +++++++--- THANKS | 3 ++- tests/atlocal.in | 13 ++++++++----- tests/java.at | 16 ++++++++-------- 5 files changed, 39 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 46d4d5be..4ca6bdc8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2009-01-08 Akim Demaille + + Fix grep portability issues. + Grep on Solaris does not support -q. + Reported by Summum Bonum. + + * NEWS: Add a stub for 2.4.2. + * THANKS: Add Summum Bonum. + * tests/atlocal.in (EGREP): New. + (CC, CXX, XSLTPROC): Make it possible to override them via + envvars. + * tests/java.at: Use $EGREP instead of egrep. + Use AT_CHECK's ignore instead of grep's -q. + 2008-12-11 Akim Demaille Pass the token type to yysyntax_error. diff --git a/NEWS b/NEWS index 8a5fc93d..ae6b9270 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,11 @@ Bison News ---------- -Changes in version ?.? (????-??-??): +* Changes in version ?.? (????-??-??): + +* Changes in version 2.4.2 (????-??-??): + +* Changes in version 2.4.1 (2008-12-11): * Java skeleton improvements: @@ -1032,9 +1036,9 @@ End: ----- Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -This file is part of Bison, the GNU Compiler Compiler. +This file is part of Bison, the GNU Parser Generator. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/THANKS b/THANKS index 2915119f..af36dcb8 100644 --- a/THANKS +++ b/THANKS @@ -80,11 +80,12 @@ Raja R Harinath harinath@cs.umn.edu Richard Stallman rms@gnu.org Robert Anisko anisko_r@epita.fr Satya Kiran Popuri satyakiran@gmail.com -Sebastien Fricker sebastien.fricker@gmail.com Sebastian Setzer sebastian.setzer.ext@siemens.com +Sebastien Fricker sebastien.fricker@gmail.com Sergei Steshenko sergstesh@yahoo.com Shura debil_urod@ngs.ru Steve Murphy murf@parsetree.com +Summum Bonum sum@geekhouse.org Tim Josling tej@melbpc.org.au Tim Van Holder tim.van.holder@pandora.be Tom Lane tgl@sss.pgh.pa.us diff --git a/tests/atlocal.in b/tests/atlocal.in index a67c4dc3..91ba6742 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -1,11 +1,11 @@ # @configure_input@ -*- shell-script -*- # Configurable variable values for Bison test suite. -# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software -# Foundation, Inc. +# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, +# 2009 Free Software Foundation, Inc. # We need a C compiler. -CC='@CC@' +: ${CC='@CC@'} # We want no optimization. CFLAGS='@O0CFLAGS@ @WARN_CFLAGS@ @WERROR_CFLAGS@' @@ -17,7 +17,7 @@ CPPFLAGS="-I$abs_top_builddir/lib @CPPFLAGS@" GCC='@GCC@' # The C++ compiler. -CXX='@CXX@' +: ${CXX='@CXX@'} # If 'exit 77'; skip all C++ tests; otherwise ':'. BISON_CXX_WORKS='@BISON_CXX_WORKS@' @@ -38,4 +38,7 @@ CONF_JAVAC='@CONF_JAVAC@' CONF_JAVA='@CONF_JAVA@' # Empty if no xsltproc was found -XSLTPROC='@XSLTPROC@' +: ${XSLTPROC='@XSLTPROC@'} + +# We need egrep. +: ${EGREP='@EGREP@'} diff --git a/tests/java.at b/tests/java.at index 5e868dc9..901551f2 100644 --- a/tests/java.at +++ b/tests/java.at @@ -1,6 +1,6 @@ # Java tests for simple calculator. -*- Autotest -*- -# Copyright (C) 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -428,7 +428,7 @@ start: END {$2}; class m4_default([$3], [Position]) {} ]) AT_BISON_CHECK([[YYParser.y]]) -AT_CHECK([[grep -q '[mb]4_' YYParser.y]], [1]) +AT_CHECK([[grep '[mb]4_' YYParser.y]], [1], [ignore]) AT_JAVA_COMPILE([[YYParser.java]]) ]) @@ -780,9 +780,9 @@ AT_CHECK_JAVA_MINIMAL([[ %define location_type "MyLoc" %define position_type "MyPos" %code { class MyPos {} }]], [[$$ = $1;]], [[MyPos]]) -AT_CHECK([[grep -q 'java.awt.Color' YYParser.java]]) -AT_CHECK([[egrep -v ' */?\*' YYParser.java | grep -q 'Position']], [1]) -AT_CHECK([[egrep -v ' */?\*' YYParser.java | grep -q 'Location']], [1]) +AT_CHECK([[grep 'java.awt.Color' YYParser.java]], [0], [ignore]) +AT_CHECK([[$EGREP -v ' */?\*' YYParser.java | grep 'Position']], [1], [ignore]) +AT_CHECK([[$EGREP -v ' */?\*' YYParser.java | grep 'Location']], [1], [ignore]) AT_CHECK_JAVA_MINIMAL_W_LEXER([[ %define stype "java.awt.Color" @@ -792,8 +792,8 @@ AT_CHECK_JAVA_MINIMAL_W_LEXER([[ %code { class MyPos {} }]], [], [[return EOF;]], [], [[$$ = $1;]], [[java.awt.Color]], [[MyPos]], [[MyLoc]]) -AT_CHECK([[grep -q 'java.awt.Color' YYParser.java]]) -AT_CHECK([[egrep -v ' */?\*' YYParser.java | grep -q 'Position']], [1]) -AT_CHECK([[egrep -v ' */?\*' YYParser.java | grep -q 'Location']], [1]) +AT_CHECK([[grep 'java.awt.Color' YYParser.java]], [0], [ignore]) +AT_CHECK([[$EGREP -v ' */?\*' YYParser.java | grep 'Position']], [1], [ignore]) +AT_CHECK([[$EGREP -v ' */?\*' YYParser.java | grep 'Location']], [1], [ignore]) AT_CLEANUP -- 2.45.2