File tree Expand file tree Collapse file tree 2 files changed +19
-13
lines changed Expand file tree Collapse file tree 2 files changed +19
-13
lines changed Original file line number Diff line number Diff line change 44@ REM
55
66@ REM config ======================================================================================
7+ call %~dp0 php-fb-config.dist.bat
78call %~dp0 php-fb-config.bat
89
910set pfb_php_tag = %1
@@ -41,6 +42,17 @@ if "%pfb_php_vers%" == "" (
4142 exit 1
4243)
4344
45+ @ REM Grab version
46+ for /f " tokens=3" %%i in ('findstr /b /c:" #define PHP_INTERBASE_VER_MAJOR" %~dp0 ..\php_interbase.h') do set VER_MAJOR = %%i
47+ for /f " tokens=3" %%i in ('findstr /b /c:" #define PHP_INTERBASE_VER_MINOR" %~dp0 ..\php_interbase.h') do set VER_MINOR = %%i
48+ for /f " tokens=3" %%i in ('findstr /b /c:" #define PHP_INTERBASE_VER_REV" %~dp0 ..\php_interbase.h') do set VER_REV = %%i
49+ for /f " tokens=3" %%i in ('findstr /b /c:" #define PHP_INTERBASE_VER_PRE" %~dp0 ..\php_interbase.h') do set VER_PRE = %%~i
50+ set PFB_VERS = %VER_MAJOR% .%VER_MINOR% .%VER_REV%%VER_PRE%
51+
52+ if %PFB_ATTACH_GIT_HASH_TO_VERS% equ 1 (
53+ for /f %%i in ('git -C %~dp0 ..\ rev-parse --short HEAD') do set PFB_VERS = %PFB_VERS% -%%i
54+ )
55+
4456@ REM Initialize
4557set php_root = php%pfb_php_vers% \%pfb_cpp_vers% \%pfb_arch% \php-src\
4658set php_interbase = php_interbase-%PFB_VERS% -%pfb_php_vers% -%pfb_cpp_vers%
Original file line number Diff line number Diff line change 11@ echo off
2+ @ REM Do not modify this file directly.
3+ @ REM Create build_scripts/php-fb-config.bat if you need to change any variable
4+ @ REM and put overrides there
5+
26@ REM php-firebird source directory
37@ REM Should point one level up. For example
48@ REM PFB_SOURCE_DIR=D:\php-firebird\ then your source should reside in D:\php-firebird\php-firebird\
@@ -11,18 +15,8 @@ set PFB_OUTPUT_DIR=%PFB_SOURCE_DIR%releases\
1115set PFB_FB32_DIR = C:\Program Files\Firebird\Firebird_5_0-x86
1216set PFB_FB64_DIR = C:\Program Files\Firebird\Firebird_5_0
1317
14- @ REM Attach current git commit hash. git command must be in PATH
15- set USE_GIT_HASH = 0
16-
17- @ REM Grab version
18- for /f " tokens=3" %%i in ('findstr /b /c:" #define PHP_INTERBASE_VER_MAJOR" %~dp0 ..\php_interbase.h') do set VER_MAJOR = %%i
19- for /f " tokens=3" %%i in ('findstr /b /c:" #define PHP_INTERBASE_VER_MINOR" %~dp0 ..\php_interbase.h') do set VER_MINOR = %%i
20- for /f " tokens=3" %%i in ('findstr /b /c:" #define PHP_INTERBASE_VER_REV" %~dp0 ..\php_interbase.h') do set VER_REV = %%i
21- for /f " tokens=3" %%i in ('findstr /b /c:" #define PHP_INTERBASE_VER_PRE" %~dp0 ..\php_interbase.h') do set VER_PRE = %%~i
22- set PFB_VERS = %VER_MAJOR% .%VER_MINOR% .%VER_REV%%VER_PRE%
23-
24- if %USE_GIT_HASH% equ 1 (
25- for /f %%i in ('git -C %~dp0 ..\ rev-parse --short HEAD') do set PFB_VERS = %PFB_VERS% -%%i
26- )
18+ @ REM Attach current git commit hash to version. git command must be in PATH
19+ set PFB_ATTACH_GIT_HASH_TO_VERS = 0
2720
21+ @ REM Additional flags for ./configure
2822@ REM set PFB_CONFIGURE_FLAGS=--enable-debug
You can’t perform that action at this time.
0 commit comments