From a2f22b1d2ada2b874925e57483164e149a9afa5d Mon Sep 17 00:00:00 2001 From: Kalle Sommer Nielsen Date: Fri, 21 Jul 2017 18:33:42 +0200 Subject: [PATCH] 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 --- win32/build/confutils.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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 { -- 2.40.0