com php-src: Don't bail configure on Windows if a configure argument was not found, this mimics that of the Unix build system.:
win32/build/confutils.js
| From: | Kalle Sommer Nielsen | Date: | Fri, 21 Jul 2017 16:33:42 +0000 |
| Subject: | com php-src: Don't bail configure on Windows if a configure argument was not found, this mimics that of the Unix build system.: win32/build/confutils.js |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-98695@lists.php.net to get a copy of this message | ||
Commit: a2f22b1d2ada2b874925e57483164e149a9afa5d
Author: Kalle Sommer Nielsen <kalle@php.net> Fri, 21 Jul 2017 18:33:42 +0200
Parents: 8ecb5fbb6b9c07d976c0afd46deeebb7d9d2d947
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a2f22b1d2ada2b874925e57483164e149a9afa5d
Log:
Don't bail configure on Windows if a configure argument was not found, this mimics that of the
Unix build system.
configure --hello-world will now yield the following in the bottom of the configure summary:
WARNING
The following arguments is invalid, and therefore ignored:
--hello-world
Changed paths:
M win32/build/confutils.js
Diff:
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index c7c0ab8..0c88d13 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -62,6 +62,9 @@ var sapi_enabled = new Array();
/* Store the headers to install */
var headers_install = new Array();
+/* Store unknown configure options */
+var INVALID_CONFIG_ARGS = new Array();
+
/* Mapping CL version > human readable name */
var VC_VERSIONS = new Array();
VC_VERSIONS[1700] = 'MSVC11 (Visual C++ 2012)';
@@ -402,8 +405,12 @@ function conf_process_args()
}
}
if (!found) {
+ INVALID_CONFIG_ARGS[INVALID_CONFIG_ARGS.length] = argname;
+
+ /*
STDERR.WriteLine("Unknown option " + argname + "; please try configure.js --help
for a list of valid options");
WScript.Quit(2);
+ */
}
}
@@ -2006,6 +2013,17 @@ function generate_files()
STDOUT.WriteBlankLines(1);
write_summary();
+ if (INVALID_CONFIG_ARGS.length) {
+ STDOUT.WriteLine('WARNING');
+ STDOUT.WriteLine('The following arguments is invalid, and therefore ignored:');
+
+ for (var i = 0; i < INVALID_CONFIG_ARGS.length; ++i) {
+ STDOUT.WriteLine(' ' + INVALID_CONFIG_ARGS[i]);
+ }
+
+ STDOUT.WriteBlankLines(2);
+ }
+
if (PHP_SNAPSHOT_BUILD != "no") {
STDOUT.WriteLine("Type 'nmake snap' to build a PHP snapshot");
} else {