From e6e78187ef4011aa3d44280fccc8fbc9baed1dfa Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Sat, 17 Mar 2007 17:11:41 +0000 Subject: [PATCH] msvc build actually needs Bison 2.2 or later, not 2.1. Or 1.875 as before. --- doc/src/sgml/install-win32.sgml | 6 +++--- src/tools/msvc/pgbison.bat | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/doc/src/sgml/install-win32.sgml b/doc/src/sgml/install-win32.sgml index 2d3c6b90f1..68ae49b820 100644 --- a/doc/src/sgml/install-win32.sgml +++ b/doc/src/sgml/install-win32.sgml @@ -1,4 +1,4 @@ - + Installation on <productname>Windows</productname> @@ -100,8 +100,8 @@ Flex Bison and Flex are required to build from CVS, but not required when - building from a release file. Note that Bison version 2.0 will not - work, but both earlier and later versions do. Bison and Flex can be + building from a release file. Note that only Bison 1.875 or versions + 2.2 and later will work. Bison and Flex can be downloaded from . diff --git a/src/tools/msvc/pgbison.bat b/src/tools/msvc/pgbison.bat index 1bebd6a607..398d89de46 100755 --- a/src/tools/msvc/pgbison.bat +++ b/src/tools/msvc/pgbison.bat @@ -1,13 +1,15 @@ @echo off -REM $PostgreSQL: pgsql/src/tools/msvc/pgbison.bat,v 1.5 2007/03/17 14:01:01 mha Exp $ +REM $PostgreSQL: pgsql/src/tools/msvc/pgbison.bat,v 1.6 2007/03/17 17:11:41 mha Exp $ if exist src\tools\msvc\buildenv.bat call src\tools\msvc\buildenv.bat SET BV= for /F "tokens=4 usebackq" %%f in (`bison -V`) do if "!BV!"=="" SET BV=%%f if "%BV%"=="" goto novarexp -if %BV% LSS 1.875 goto nobison -if %BV% EQU 2.1 goto nobison +if %BV% EQU 1.875 goto bisonok +if %BV% GEQ 2.2 goto bisonok +goto nobison +:bisonok if "%1" == "src\backend\parser\gram.y" call :generate %1 src\backend\parser\gram.c src\include\parser\parse.h if "%1" == "src\backend\bootstrap\bootparse.y" call :generate %1 src\backend\bootstrap\bootparse.c src\backend\bootstrap\bootstrap_tokens.h