diff options
author | Kalle Sommer Nielsen <kalle@php.net> | 2017-07-21 18:33:42 +0200 |
---|---|---|
committer | Kalle Sommer Nielsen <kalle@php.net> | 2017-07-21 18:33:42 +0200 |
commit | a2f22b1d2ada2b874925e57483164e149a9afa5d (patch) | |
tree | 41699b98a742c1038895917918e66d1b501d5e1d | |
parent | 8ecb5fbb6b9c07d976c0afd46deeebb7d9d2d947 (diff) | |
download | php-git-a2f22b1d2ada2b874925e57483164e149a9afa5d.tar.gz |
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
-rw-r--r-- | win32/build/confutils.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/win32/build/confutils.js b/win32/build/confutils.js index c7c0ab841e..0c88d134c9 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 { |