This is a patch for building pgsql with msvc. For some reason, if you tell
my bison to work on file /some/path/foo.y it will put the resulting files
into the current directory while Magnus' bison puts them into /some/path.

The attached patch makes both kinds work by setting the destination file
explicitly.


Joachim

diff -cr cvs/src/tools/msvc/pgbison.bat cvs.build/src/tools/msvc/pgbison.bat
*** cvs/src/tools/msvc/pgbison.bat	Tue Jan 23 22:35:18 2007
--- cvs.build/src/tools/msvc/pgbison.bat	Sun Jan 28 12:22:41 2007
***************
*** 19,31 ****
  
  :generate
  SET fn=%1
! bison -d %fn%
  if errorlevel 1 exit 1
! copy /y %fn:~0,-2%.tab.c %2
! if errorlevel 1 exit 1
! copy /y %fn:~0,-2%.tab.h %3
! if errorlevel 1 exit 1
! del %fn:~0,-2%.tab.*
  exit 0
  
  
--- 19,33 ----
  
  :generate
  SET fn=%1
! SET cf=%2
! bison.exe -d %fn% -o %cf%
  if errorlevel 1 exit 1
! SET hf=%cf:~0,-2%.h
! if not "%hf%"=="%3" (
!         copy /y %hf% %3
!         if errorlevel 1 exit 1
!         del %hf%
! )
  exit 0
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to