8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 22:03:03 +01:00
firebird-mirror/builds/win32/parse.bat
2012-04-25 09:05:10 +00:00

27 lines
624 B
Batchfile

@echo off
@echo.
@call setenvvar.bat
@if errorlevel 1 (goto :END)
@call set_build_target.bat %*
@echo Generating parse.cpp and dsql.tab.h
@sed -n "/%%type .*/p" < %FB_ROOT_PATH%\src\dsql\parse.y > y.types
@sed "s/%%type .*//" < %FB_ROOT_PATH%\src\dsql\parse.y > y.y
@sed -i "/\/*\*\* TYPES \*\*\*\//r y.types" y.y
%FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\btyacc\btyacc -l -d -S %FB_ROOT_PATH%\src\dsql\btyacc_fb.ske y.y
@if errorlevel 1 (exit /B 1)
@copy y_tab.h %FB_ROOT_PATH%\src\include\gen\parse.h > nul
@copy y_tab.c %FB_ROOT_PATH%\src\dsql\parse.cpp > nul
@del y.y
@del y.types
@del y_tab.h
@del y_tab.c
@del sed*
:END