8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 13:23:03 +01:00

Make Windows build scripts reuse previous configuration.

This commit is contained in:
Adriano dos Santos Fernandes 2022-08-16 07:24:59 -03:00
parent d0c20cc4a4
commit d2f64be550
5 changed files with 26 additions and 31 deletions

View File

@ -27,8 +27,13 @@
@echo off
:: reset ERRLEV to clear error from last run in same cmd shell
set ERRLEV=0
:: Assume we are preparing a production build
set FBBUILD_BUILDTYPE=release
:: Assume we are preparing a production build if FBBUILD_BUILDTYPE is not defined
if not defined FBBUILD_BUILDTYPE (
set FB_DBG=
set FBBUILD_BUILDTYPE=release
)
:: Don't ship pdb files by default
set FBBUILD_SHIP_PDB=no_pdb
:: Reset "make" vars to zero

View File

@ -119,10 +119,10 @@ goto :EOF
:LibTom
@echo.
@echo Building LibTomMath (%FB_OBJ_DIR%)...
@call compile.bat extern\libtommath\libtommath_MSVC%MSVC_VERSION% libtommath_%FB_CONFIG%_%FB_TARGET_PLATFORM%.log libtommath
@call compile.bat extern\libtommath\libtommath_MSVC%MSVC_VERSION% libtommath_%FBBUILD_BUILDTYPE%_%FB_TARGET_PLATFORM%.log libtommath
if errorlevel 1 call :boot2 libtommath_%FB_OBJ_DIR%
@echo Building LibTomCrypt (%FB_OBJ_DIR%)...
@call compile.bat extern\libtomcrypt\libtomcrypt_MSVC%MSVC_VERSION% libtomcrypt_%FB_CONFIG%_%FB_TARGET_PLATFORM%.log libtomcrypt
@call compile.bat extern\libtomcrypt\libtomcrypt_MSVC%MSVC_VERSION% libtomcrypt_%FBBUILD_BUILDTYPE%_%FB_TARGET_PLATFORM%.log libtomcrypt
if errorlevel 1 call :boot2 libtomcrypt_%FB_OBJ_DIR%
goto :EOF
@ -131,7 +131,7 @@ goto :EOF
:decNumber
@echo.
@echo Building decNumber (%FB_OBJ_DIR%)...
@call compile.bat extern\decNumber\msvc\decNumber_MSVC%MSVC_VERSION% decNumber_%FB_CONFIG%_%FB_TARGET_PLATFORM%.log decNumber
@call compile.bat extern\decNumber\msvc\decNumber_MSVC%MSVC_VERSION% decNumber_%FBBUILD_BUILDTYPE%_%FB_TARGET_PLATFORM%.log decNumber
if errorlevel 1 call :boot2 decNumber_%FB_OBJ_DIR%
goto :EOF
@ -140,11 +140,11 @@ goto :EOF
:ttmath
@echo.
@echo Building ttmath (%FB_OBJ_DIR%)...
@mkdir %FB_ROOT_PATH%\extern\ttmath\%FB_CONFIG% 2>nul
if /I "%FB_CONFIG%"=="debug" (
@ml64.exe /c /Zi /Fo %FB_ROOT_PATH%\extern\ttmath\%FB_CONFIG%\ttmathuint_x86_64_msvc.obj %FB_ROOT_PATH%\extern\ttmath\ttmathuint_x86_64_msvc.asm
@mkdir %FB_ROOT_PATH%\extern\ttmath\%FBBUILD_BUILDTYPE% 2>nul
if /I "%FBBUILD_BUILDTYPE%"=="debug" (
@ml64.exe /c /Zi /Fo %FB_ROOT_PATH%\extern\ttmath\%FBBUILD_BUILDTYPE%\ttmathuint_x86_64_msvc.obj %FB_ROOT_PATH%\extern\ttmath\ttmathuint_x86_64_msvc.asm
) else (
@ml64.exe /c /Fo %FB_ROOT_PATH%\extern\ttmath\%FB_CONFIG%\ttmathuint_x86_64_msvc.obj %FB_ROOT_PATH%\extern\ttmath\ttmathuint_x86_64_msvc.asm
@ml64.exe /c /Fo %FB_ROOT_PATH%\extern\ttmath\%FBBUILD_BUILDTYPE%\ttmathuint_x86_64_msvc.obj %FB_ROOT_PATH%\extern\ttmath\ttmathuint_x86_64_msvc.asm
)
if errorlevel 1 call :boot2 ttmath_%FB_OBJ_DIR%
goto :EOF

View File

@ -5,7 +5,6 @@
set ERRLEV=0
set FBBUILD_NOCLEAN=
set FBBUILD_REAL_CLEAN=
set FBBUILD_BUILDTYPE=release
set FBBUILD_INCLUDE_PDB=
set FBBUILD_MAKE_KITS_ONLY=
set FBBUILD_BUILD_ONLY=0
@ -24,7 +23,6 @@ for %%v in ( %1 %2 %3 %4 %5 %6 %7 %8 %9 ) do (
for %%v in ( %* ) do (
( if /I "%%v"=="NOCLEAN" (set FBBUILD_NOCLEAN=1) )
( if /I "%%v"=="REALCLEAN" (set FBBUILD_REAL_CLEAN=REALCLEAN) )
( if /I "%%v"=="DEBUG" (set FBBUILD_BUILDTYPE=debug) )
( if /I "%%v"=="PDB" (set FBBUILD_INCLUDE_PDB=1) )
( if /I "%%v"=="REPACK" (set FBBUILD_MAKE_KITS_ONLY=1) )
( if /I "%%v"=="JUSTBUILD" (set FBBUILD_BUILD_ONLY=1) )
@ -32,7 +30,7 @@ for %%v in ( %* ) do (
( if /I "%%v"=="SNAPSHOT" (set FB2_SNAPSHOT=1) )
)
call :SETVCENV
@call setenvvar.bat %*
if "%ERRLEV%"=="1" goto :END
if defined FBBUILD_TEST_ONLY ( goto TEST_ENV & goto :EOF )
@ -100,22 +98,10 @@ goto :END
::---------
:SETVCENV
::===============================
:: Set up the compiler environment
@call setenvvar.bat %*
if "%ERRLEV%"=="1" goto :END
goto :END
::---------
:TEST_ENV
::===============================
:: Show variables
call :SETVCENV
@call setenvvar.bat %*
if "%ERRLEV%"=="1" goto :END
echo.
set FB

View File

@ -10,14 +10,17 @@
@echo off
set FB_DBG=
set FB_CONFIG=release
set FB_CLEAN=
for %%v in ( %* ) do (
( if /I "%%v"=="DEBUG" ( (set FB_DBG=TRUE) && (set FB_CONFIG=debug) ) )
( if /I "%%v"=="DEBUG" ( (set FB_DBG=TRUE) && (set FBBUILD_BUILDTYPE=debug) ) )
( if /I "%%v"=="CLEAN" (set FB_CLEAN=:rebuild) )
( if /I "%%v"=="RELEASE" ( (set FB_DBG=) && (set FB_CONFIG=release) ) )
( if /I "%%v"=="RELEASE" ( (set FB_DBG=) && (set FBBUILD_BUILDTYPE=release) ) )
)
@if not defined FBBUILD_BUILDTYPE (
set FB_DBG=
set FBBUILD_BUILDTYPE=release
)
:: Default target CPU architecture is the native environment
@ -130,7 +133,7 @@ for %%v in ( %* ) do (
@if "%FB_PROCESSOR_ARCHITECTURE%"=="AMD64" (set FB_TARGET_PLATFORM=x64)
@set FB_OUTPUT_DIR=%FB_ROOT_PATH%\output_%FB_TARGET_PLATFORM%_%FB_CONFIG%
@set FB_OUTPUT_DIR=%FB_ROOT_PATH%\output_%FB_TARGET_PLATFORM%_%FBBUILD_BUILDTYPE%
@set FB_TEMP_DIR=%FB_ROOT_PATH%\temp\%FB_TARGET_PLATFORM%
@set FB_INSTALL_SCRIPTS=%FB_ROOT_PATH%\builds\install\arch-specific\win32
@set FB_GEN_DIR=%FB_ROOT_PATH%\gen
@ -138,7 +141,7 @@ for %%v in ( %* ) do (
@set FB_ICU_SOURCE_BIN=%FB_ROOT_PATH%\extern\icu\%FB_TARGET_PLATFORM%\release\bin\
@set FIREBIRD_BOOT_BUILD=1
@set FB_OBJ_DIR=%FB_TARGET_PLATFORM%\%FB_CONFIG%
@set FB_OBJ_DIR=%FB_TARGET_PLATFORM%\%FBBUILD_BUILDTYPE%
@set FB_BOOT_BIN_DIR=%FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird
@set FB_BIN_DIR=%FB_OUTPUT_DIR%

View File

@ -1,3 +1,4 @@
call setenvvar.bat %*
call make_api.bat
call make_dyn.bat
call make_stat.bat