From d5eaa637ce4b579a6c22c880ba9f60745526a031 Mon Sep 17 00:00:00 2001
From: Magnus Hagander <magnus@hagander.net>
Date: Sat, 7 Jul 2007 07:43:21 +0000
Subject: [PATCH] Move parse.h into src/backend on msvc, which is where it is
 on Unix. Fixes builds from tarballs where the file is pre-generated.

Yoshiyuki Asaba
---
 src/tools/msvc/Mkvcbuild.pm | 7 ++++++-
 src/tools/msvc/clean.bat    | 4 ++--
 src/tools/msvc/pgbison.bat  | 4 ++--
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index 469563e4a99..1bc19ed70fe 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -3,7 +3,7 @@ package Mkvcbuild;
 #
 # Package that generates build files for msvc build
 #
-# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.13 2007/06/12 18:31:28 mha Exp $
+# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.14 2007/07/07 07:43:20 mha Exp $
 #
 use Carp;
 use Win32;
@@ -185,19 +185,23 @@ sub mkvcbuild
 
     my $psql = AddSimpleFrontend('psql', 1);
     $psql->AddIncludeDir('src\bin\pg_dump');
+    $psql->AddIncludeDir('src\backend');
     $psql->AddFile('src\bin\psql\psqlscan.l');
 
     my $pgdump = AddSimpleFrontend('pg_dump', 1);
+    $pgdump->AddIncludeDir('src\backend');
     $pgdump->AddFile('src\bin\pg_dump\pg_dump.c');
     $pgdump->AddFile('src\bin\pg_dump\common.c');
     $pgdump->AddFile('src\bin\pg_dump\pg_dump_sort.c');
 
     my $pgdumpall = AddSimpleFrontend('pg_dump', 1);
     $pgdumpall->{name} = 'pg_dumpall';
+    $pgdumpall->AddIncludeDir('src\backend');
     $pgdumpall->AddFile('src\bin\pg_dump\pg_dumpall.c');
 
     my $pgrestore = AddSimpleFrontend('pg_dump', 1);
     $pgrestore->{name} = 'pg_restore';
+    $pgrestore->AddIncludeDir('src\backend');
     $pgrestore->AddFile('src\bin\pg_dump\pg_restore.c');
 
     my $zic = $solution->AddProject('zic','exe','utils');
@@ -293,6 +297,7 @@ sub mkvcbuild
             if ($f =~ /\/keywords\.o$/)
             {
                 $proj->AddFile('src\backend\parser\keywords.c');
+                $proj->AddIncludeDir('src\backend');
             }
             else
             {
diff --git a/src/tools/msvc/clean.bat b/src/tools/msvc/clean.bat
index 7d4a0a802e7..f3db698b3c4 100755
--- a/src/tools/msvc/clean.bat
+++ b/src/tools/msvc/clean.bat
@@ -1,5 +1,5 @@
 @echo off
-REM $PostgreSQL: pgsql/src/tools/msvc/clean.bat,v 1.5 2007/06/12 11:07:34 mha Exp $
+REM $PostgreSQL: pgsql/src/tools/msvc/clean.bat,v 1.6 2007/07/07 07:43:21 mha Exp $
 
 set D=%CD%
 if exist ..\msvc if exist ..\..\..\src cd ..\..\..
@@ -16,7 +16,7 @@ call :del src\backend\win32ver.rc
 REM Delete files created with GenerateFiles() in Solution.pm
 call :del src\include\pg_config.h
 call :del src\include\pg_config_os.h
-call :del src\include\parser\parse.h
+call :del src\backend\parser\parse.h
 call :del src\include\utils\fmgroids.h
 
 call :del src\backend\utils\fmgrtab.c
diff --git a/src/tools/msvc/pgbison.bat b/src/tools/msvc/pgbison.bat
index 398d89de46c..5c8f60f6c06 100755
--- a/src/tools/msvc/pgbison.bat
+++ b/src/tools/msvc/pgbison.bat
@@ -1,5 +1,5 @@
 @echo off
-REM $PostgreSQL: pgsql/src/tools/msvc/pgbison.bat,v 1.6 2007/03/17 17:11:41 mha Exp $
+REM $PostgreSQL: pgsql/src/tools/msvc/pgbison.bat,v 1.7 2007/07/07 07:43:21 mha Exp $
 
 if exist src\tools\msvc\buildenv.bat call src\tools\msvc\buildenv.bat
 
@@ -11,7 +11,7 @@ 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\parser\gram.y" call :generate %1 src\backend\parser\gram.c src\backend\parser\parse.h
 if "%1" == "src\backend\bootstrap\bootparse.y" call :generate %1 src\backend\bootstrap\bootparse.c src\backend\bootstrap\bootstrap_tokens.h
 if "%1" == "src\pl\plpgsql\src\gram.y" call :generate %1 src\pl\plpgsql\src\pl_gram.c src\pl\plpgsql\src\pl.tab.h
 if "%1" == "src\interfaces\ecpg\preproc\preproc.y" call :generate %1 src\interfaces\ecpg\preproc\preproc.c src\interfaces\ecpg\preproc\preproc.h
-- 
GitLab