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
|
|
|
|
::
|
|
|
|
|
2004-03-31 19:50:17 +02:00
|
|
|
@echo off
|
2003-01-24 17:39:37 +01:00
|
|
|
|
|
|
|
::===========
|
|
|
|
:MAIN
|
2003-07-02 16:40:30 +02:00
|
|
|
|
2022-08-08 13:32:53 +02:00
|
|
|
@call setenvvar.bat %*
|
|
|
|
|
|
|
|
for %%v in ( %* ) do (
|
|
|
|
@if "%%v"=="BOOT" (set BOOTBUILD=1) else (set BOOTBUILD=0)
|
|
|
|
)
|
2003-07-08 12:56:41 +02:00
|
|
|
|
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
|
2008-12-09 00:45:23 +01:00
|
|
|
@if "%3"=="" (call :GPRE_M %1 %2) else (call :GPRE_GDS %1 %2 %3 %4)
|
2006-06-28 02:56:45 +02:00
|
|
|
|
2007-09-06 15:25:04 +02:00
|
|
|
@if not exist %FB_GEN_DIR%\%1\%2.cpp (
|
|
|
|
@move %FB_GEN_DIR%\preprocessing.cpp %FB_GEN_DIR%\%1\%2.cpp
|
2006-06-28 02:56:45 +02:00
|
|
|
) else (
|
2007-09-06 15:25:04 +02:00
|
|
|
@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
|
2006-06-28 02:56:45 +02:00
|
|
|
)
|
|
|
|
|
2003-01-24 17:39:37 +01:00
|
|
|
@echo.
|
|
|
|
@goto :EOF
|
|
|
|
|
|
|
|
::===========
|
|
|
|
:GPRE_M
|
2010-01-01 19:39:42 +01:00
|
|
|
@%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.
|
2022-09-04 17:30:30 +02:00
|
|
|
@set GPRE=%FB_BIN_DIR%\gpre_boot -lang_internal
|
2018-02-19 11:38:28 +01:00
|
|
|
@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
|
2006-05-27 20:06:09 +02:00
|
|
|
@for %%i in (dba) do @call :PREPROCESS utilities/gstat %%i
|
|
|
|
|
2022-09-04 17:30:30 +02:00
|
|
|
@set GPRE=%FB_BIN_DIR%\gpre_boot
|
2006-05-27 20:06:09 +02:00
|
|
|
@for %%i in (alice_meta) do @call :PREPROCESS alice %%i
|
2009-10-21 02:42:38 +02:00
|
|
|
@for %%i in (metd, DdlNodes, PackageNodes) do @call :PREPROCESS dsql %%i -gds_cxx
|
2010-10-21 00:15:48 +02:00
|
|
|
@for %%i in (gpre_meta) do @call :PREPROCESS gpre/std %%i
|
2024-08-02 12:23:05 +02:00
|
|
|
@for %%i in (dfw, dpm, dyn_util, fun, grant, ini, met, scl, Function, SystemTriggers) do @call :PREPROCESS jrd %%i -gds_cxx
|
2006-05-27 20:06:09 +02:00
|
|
|
@for %%i in (stats) do @call :PREPROCESS utilities %%i
|
2003-01-24 17:39:37 +01:00
|
|
|
@goto :EOF
|
|
|
|
|
|
|
|
::===========
|
|
|
|
:MASTER_PROCESS
|
2010-10-21 00:15:48 +02:00
|
|
|
@set GPRE=%FB_BIN_DIR%\gpre
|
2003-01-24 17:39:37 +01:00
|
|
|
@for %%i in (alice_meta) do @call :PREPROCESS alice %%i
|
2010-07-23 16:06:29 +02:00
|
|
|
@for %%i in (LegacyManagement) do @call :PREPROCESS auth/SecurityDatabase %%i
|
2018-02-19 11:38:28 +01:00
|
|
|
@for %%i in (backup, restore, OdsDetection) do @call :PREPROCESS burp %%i -ocxx -m
|
2009-12-05 15:21:52 +01:00
|
|
|
@for %%i in (metd) do @call :PREPROCESS dsql %%i -gds_cxx
|
2009-10-21 02:42:38 +02:00
|
|
|
@for %%i in (DdlNodes, PackageNodes) do @call :PREPROCESS dsql %%i -gds_cxx
|
2010-10-21 00:15:48 +02:00
|
|
|
@for %%i in (gpre_meta) do @call :PREPROCESS gpre/std %%i
|
2024-08-02 03:44:08 +02:00
|
|
|
@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
|
2004-05-28 03:31:27 +02:00
|
|
|
@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
|