Debian Codegraph @

builds/win32/preprocess.bat

raw
1 ::
2 :: Preprocess all .epp files to .cpp
3 :: ---------------------------------
4 ::
5 :: To do:
6 ::
7 :: o Better/Some documentation as to what this does
8 :: o Add some logging/diagnostics, so we can see what is happening
9 :: and track errors.
10 :: o License boiler plate, copyright and authorship acknowledgements
11 ::
12
13 @echo off
14
15 ::===========
16 :MAIN
17
18 @call setenvvar.bat
19 @if not defined FB_BIN_DIR (@call set_build_target.bat %*)
20
21 @if "%1"=="BOOT" (set BOOTBUILD=1) else (set BOOTBUILD=0)
22 @echo.
23 @if "%BOOTBUILD%"=="1" (call :BOOT_PROCESS) else (call :MASTER_PROCESS)
24 @set BOOTBUILD=
25 @set GPRE=
26 @goto :END
27
28 ::===========
29 :PREPROCESS
30 @echo Processing %1/%2.epp
31 @echo Calling GPRE for %1/%2.epp
32 @if "%3"=="" (call :GPRE_M %1 %2) else (call :GPRE_GDS %1 %2 %3 %4)
33
34 @if not exist %FB_GEN_DIR%\%1\%2.cpp (
35 @move %FB_GEN_DIR%\preprocessing.cpp %FB_GEN_DIR%\%1\%2.cpp
36 ) else (
37 @fc %FB_GEN_DIR%\preprocessing.cpp %FB_GEN_DIR%\%1\%2.cpp >nul
38 @if errorlevel 1 @move %FB_GEN_DIR%\preprocessing.cpp %FB_GEN_DIR%\%1\%2.cpp
39 )
40
41 @echo.
42 @goto :EOF
43
44 ::===========
45 :GPRE_M
46 @%GPRE% -n -m %FB_ROOT_PATH%\src\%1\%2.epp %FB_GEN_DIR%\preprocessing.cpp -b %FB_GEN_DB_DIR%/dbs/
47 @goto :EOF
48
49 ::===========
50 :GPRE_GDS
51 @%GPRE% -n -ids %3 %4 %FB_ROOT_PATH%\src\%1\%2.epp %FB_GEN_DIR%\preprocessing.cpp -b %FB_GEN_DB_DIR%/dbs/
52 goto :EOF
53
54 ::===========
55 :BOOT_PROCESS
56 @echo.
57 @set GPRE=%FB_BIN_DIR%\gpre_boot -lang_internal
58 @for %%i in (backup, restore, OdsDetection) do @call :PREPROCESS burp %%i -ocxx -m
59 @for %%i in (extract, isql, show) do @call :PREPROCESS isql %%i -ocxx
60 @for %%i in (dba) do @call :PREPROCESS utilities/gstat %%i
61
62 @set GPRE=%FB_BIN_DIR%\gpre_boot
63 @for %%i in (alice_meta) do @call :PREPROCESS alice %%i
64 @for %%i in (array, blob) do @call :PREPROCESS yvalve %%i
65 @for %%i in (metd, DdlNodes, PackageNodes) do @call :PREPROCESS dsql %%i -gds_cxx
66 @for %%i in (gpre_meta) do @call :PREPROCESS gpre/std %%i
67 @for %%i in (dfw, dpm, dyn_util, fun, grant, ini, met, scl, Function) do @call :PREPROCESS jrd %%i -gds_cxx
68 @for %%i in (stats) do @call :PREPROCESS utilities %%i
69 @goto :EOF
70
71 ::===========
72 :MASTER_PROCESS
73 @set GPRE=%FB_BIN_DIR%\gpre
74 @for %%i in (alice_meta) do @call :PREPROCESS alice %%i
75 @for %%i in (LegacyManagement) do @call :PREPROCESS auth/SecurityDatabase %%i
76 @for %%i in (backup, restore, OdsDetection) do @call :PREPROCESS burp %%i -ocxx -m
77 @for %%i in (array, blob) do @call :PREPROCESS yvalve %%i
78 @for %%i in (metd) do @call :PREPROCESS dsql %%i -gds_cxx
79 @for %%i in (DdlNodes, PackageNodes) do @call :PREPROCESS dsql %%i -gds_cxx
80 @for %%i in (gpre_meta) do @call :PREPROCESS gpre/std %%i
81 @for %%i in (dfw, dpm, dyn_util, fun, grant, ini, met, scl, Function) do @call :PREPROCESS jrd %%i -gds_cxx
82 @for %%i in (codes) do @call :PREPROCESS misc %%i
83 @for %%i in (build_file) do @call :PREPROCESS msgs %%i
84 @for %%i in (help, meta, proc, show) do @call :PREPROCESS qli %%i
85 @for %%i in (extract, isql, show) do @call :PREPROCESS isql %%i -ocxx
86 @for %%i in (dba) do @call :PREPROCESS utilities/gstat %%i
87 @for %%i in (stats) do @call :PREPROCESS utilities %%i
88 @goto :EOF
89
90 :END