mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fail phpize early if config.w32 is missing (GH-17100)
On Windows, phpize happily builds configure even if there is no config.w32, but running configure then error with "Must be run from the root of the extension source". This is confusing. We bring phpize's behavior on par with POSIX systems, where the missing config.m4 is detected and reported right away.
This commit is contained in:
parent
1ff68f58f7
commit
c14bc7b10f
2 changed files with 9 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
@echo off
|
@echo off
|
||||||
SET PHP_BUILDCONF_PATH=%~dp0
|
SET PHP_BUILDCONF_PATH=%~dp0
|
||||||
cscript /nologo /e:jscript %PHP_BUILDCONF_PATH%\script\phpize.js %*
|
cscript /nologo /e:jscript %PHP_BUILDCONF_PATH%\script\phpize.js %*
|
||||||
|
IF ERRORLEVEL 0 exit /b 3
|
||||||
IF NOT EXIST configure.bat (
|
IF NOT EXIST configure.bat (
|
||||||
echo Error generating configure script, configure script was not copied
|
echo Error generating configure script, configure script was not copied
|
||||||
exit /b 3
|
exit /b 3
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
// This generates a configure script for win32 build
|
// This generates a configure script for win32 build
|
||||||
|
|
||||||
var STDOUT = WScript.StdOut;
|
var STDOUT = WScript.StdOut;
|
||||||
|
var STDERR = WScript.StdErr;
|
||||||
|
|
||||||
var FSO = WScript.CreateObject("Scripting.FileSystemObject");
|
var FSO = WScript.CreateObject("Scripting.FileSystemObject");
|
||||||
var C = FSO.CreateTextFile("configure.js", true);
|
var C = FSO.CreateTextFile("configure.js", true);
|
||||||
|
@ -201,6 +202,13 @@ function buildconf_process_args()
|
||||||
if (buildconf_process_args() == 0) {
|
if (buildconf_process_args() == 0) {
|
||||||
WScript.Quit(3);
|
WScript.Quit(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FSO.FileExists("config.w32")) {
|
||||||
|
STDERR.WriteLine("Cannot find config.w32");
|
||||||
|
STDERR.WriteLine("Must be run from the root of the extension source");
|
||||||
|
WScript.Quit(10);
|
||||||
|
}
|
||||||
|
|
||||||
STDOUT.WriteLine("Rebuilding configure.js");
|
STDOUT.WriteLine("Rebuilding configure.js");
|
||||||
STDOUT.WriteLine(PHP_DIR);
|
STDOUT.WriteLine(PHP_DIR);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue