From: Peter Kokot Date: Sun, 23 Jun 2019 13:53:19 +0000 (+0200) Subject: Remove warnings for bison and re2c checks X-Git-Tag: php-7.4.0alpha3~170 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=798fed3b0deb1d979fd4f1916e938890c423577e;p=php Remove warnings for bison and re2c checks This patch removes warnings when lexer and parser files are already generated. For example, when downloading a PHP release. Realistically, it is not so trivial to rebuild lexer and parser files without removing them first. And considering that tarballs don't have cleaning tools such as Git, this would require manual removali. Related also to https://bugs.gentoo.org/593278 --- diff --git a/build/php.m4 b/build/php.m4 index 63670108ff..9b84ce3274 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -1838,9 +1838,7 @@ AC_DEFUN([PHP_PROG_BISON], [ case $php_bison_check in ""|invalid[)] - if test -f "$abs_srcdir/Zend/zend_language_parser.h" && test -f "$abs_srcdir/Zend/zend_language_parser.c"; then - AC_MSG_WARN([bison $php_bison_required_version is required if you want to regenerate PHP parsers (excluded versions: $php_bison_excluded_versions)]) - else + if test ! -f "$abs_srcdir/Zend/zend_language_parser.h" || test ! -f "$abs_srcdir/Zend/zend_language_parser.c"; then AC_MSG_ERROR([bison $php_bison_required_version is required to generate PHP parsers (excluded versions: $php_bison_excluded_versions).]) fi @@ -1895,9 +1893,7 @@ AC_DEFUN([PHP_PROG_RE2C],[ case $php_re2c_check in ""|invalid[)] - if test -f "$abs_srcdir/Zend/zend_language_scanner.c"; then - AC_MSG_WARN([re2c $php_re2c_required_version is required if you want to regenerate PHP lexers.]) - else + if test ! -f "$abs_srcdir/Zend/zend_language_scanner.c"; then AC_MSG_ERROR([re2c $php_re2c_required_version is required to generate PHP lexers.]) fi