8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 00:03:02 +01:00
firebird-mirror/builds/win32/preprocess.bat

88 lines
2.7 KiB
Batchfile
Raw Normal View History

2003-01-24 17:39:37 +01:00
::
:: Preprocess all .epp files to .cpp
:: ---------------------------------
::
:: To do:
::
:: o Better/Some documentation as to what this does
:: o Add some logging/diagnostics, so we can see what is happening
:: and track errors.
:: o License boiler plate, copyright and authorship acknowledgements
::
@echo off
2003-01-24 17:39:37 +01:00
::===========
:MAIN
@call setenvvar.bat %*
for %%v in ( %* ) do (
@if "%%v"=="BOOT" (set BOOTBUILD=1) else (set BOOTBUILD=0)
)
2003-01-24 17:39:37 +01:00
@echo.
@if "%BOOTBUILD%"=="1" (call :BOOT_PROCESS) else (call :MASTER_PROCESS)
@set BOOTBUILD=
@set GPRE=
2003-01-25 09:55:04 +01:00
@goto :END
2003-01-24 17:39:37 +01:00
::===========
:PREPROCESS
@echo Processing %1/%2.epp
@echo Calling GPRE for %1/%2.epp
@if "%3"=="" (call :GPRE_M %1 %2) else (call :GPRE_GDS %1 %2 %3 %4)
@if not exist %FB_GEN_DIR%\%1\%2.cpp (
@move %FB_GEN_DIR%\preprocessing.cpp %FB_GEN_DIR%\%1\%2.cpp
) else (
@fc %FB_GEN_DIR%\preprocessing.cpp %FB_GEN_DIR%\%1\%2.cpp >nul
@if errorlevel 1 @move %FB_GEN_DIR%\preprocessing.cpp %FB_GEN_DIR%\%1\%2.cpp
)
2003-01-24 17:39:37 +01:00
@echo.
@goto :EOF
::===========
:GPRE_M
@%GPRE% -n -m %FB_ROOT_PATH%\src\%1\%2.epp %FB_GEN_DIR%\preprocessing.cpp -b %FB_GEN_DB_DIR%/dbs/
2003-01-24 17:39:37 +01:00
@goto :EOF
::===========
:GPRE_GDS
2010-10-24 00:36:01 +02:00
@%GPRE% -n -ids %3 %4 %FB_ROOT_PATH%\src\%1\%2.epp %FB_GEN_DIR%\preprocessing.cpp -b %FB_GEN_DB_DIR%/dbs/
2003-01-24 17:39:37 +01:00
goto :EOF
::===========
:BOOT_PROCESS
2010-10-24 00:36:01 +02:00
@echo.
@set GPRE=%FB_BIN_DIR%\gpre_boot -lang_internal
@for %%i in (backup, restore, OdsDetection) do @call :PREPROCESS burp %%i -ocxx -m
2014-01-16 12:41:46 +01:00
@for %%i in (extract, isql, show) do @call :PREPROCESS isql %%i -ocxx
@for %%i in (dba) do @call :PREPROCESS utilities/gstat %%i
@set GPRE=%FB_BIN_DIR%\gpre_boot
@for %%i in (alice_meta) do @call :PREPROCESS alice %%i
@for %%i in (metd, DdlNodes, PackageNodes) do @call :PREPROCESS dsql %%i -gds_cxx
@for %%i in (gpre_meta) do @call :PREPROCESS gpre/std %%i
@for %%i in (dfw, dpm, dyn_util, fun, grant, ini, met, scl, Function, SystemTriggers) do @call :PREPROCESS jrd %%i -gds_cxx
@for %%i in (stats) do @call :PREPROCESS utilities %%i
2003-01-24 17:39:37 +01:00
@goto :EOF
::===========
:MASTER_PROCESS
@set GPRE=%FB_BIN_DIR%\gpre
2003-01-24 17:39:37 +01:00
@for %%i in (alice_meta) do @call :PREPROCESS alice %%i
@for %%i in (LegacyManagement) do @call :PREPROCESS auth/SecurityDatabase %%i
@for %%i in (backup, restore, OdsDetection) do @call :PREPROCESS burp %%i -ocxx -m
@for %%i in (metd) do @call :PREPROCESS dsql %%i -gds_cxx
@for %%i in (DdlNodes, PackageNodes) do @call :PREPROCESS dsql %%i -gds_cxx
@for %%i in (gpre_meta) do @call :PREPROCESS gpre/std %%i
@for %%i in (dfw, dpm, dyn_util, fun, grant, ini, met, scl, Function, SystemTriggers) do @call :PREPROCESS jrd %%i -gds_cxx
2014-01-16 12:41:46 +01:00
@for %%i in (extract, isql, show) do @call :PREPROCESS isql %%i -ocxx
@for %%i in (dba) do @call :PREPROCESS utilities/gstat %%i
2003-09-04 15:47:49 +02:00
@for %%i in (stats) do @call :PREPROCESS utilities %%i
2003-01-24 17:39:37 +01:00
@goto :EOF
:END