]> granicus.if.org Git - php/commitdiff
Don't bail configure on Windows if a configure argument was not found, this mimics...
authorKalle Sommer Nielsen <kalle@php.net>
Fri, 21 Jul 2017 16:33:42 +0000 (18:33 +0200)
committerKalle Sommer Nielsen <kalle@php.net>
Fri, 21 Jul 2017 16:33:42 +0000 (18:33 +0200)
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

index c7c0ab841eaa626dc12dcd7dbdfe3156c46c04ce..0c88d134c989363646a21feda41ae1434f09fd15 100644 (file)
@@ -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 {