diff options
| author | Wez Furlong <wez@php.net> | 2004-02-12 12:30:41 +0000 |
|---|---|---|
| committer | Wez Furlong <wez@php.net> | 2004-02-12 12:30:41 +0000 |
| commit | 08a1b6c476ad0df7db0535e7ca451bfc46c51ac6 (patch) | |
| tree | aa9ca78ae4c1d63cf887fe50a1cb0973e63eb79b /win32/build/confutils.js | |
| parent | 7d3215d33321173c58db4d86b7398e16c5c55d13 (diff) | |
| download | php-git-08a1b6c476ad0df7db0535e7ca451bfc46c51ac6.tar.gz | |
Tidy up "nmake clean" for people that don't have a PECL checkout.
Be paranoid when building a snapshot: if the module is not a core
module (eg: it comes from outside of ext or sapi) and it defaults to "yes",
then force it to become shared. This will prevent a pecl ext from
accidentally being compiled statically into the core, and prevent that
ext from breaking the core build. You can still manually force a static
build by explicitly specifying the args for that extension on your configure
line.
Diffstat (limited to 'win32/build/confutils.js')
| -rw-r--r-- | win32/build/confutils.js | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/win32/build/confutils.js b/win32/build/confutils.js index d74f59b4f2..7290996bda 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -// $Id: confutils.js,v 1.37 2004-01-09 15:11:19 wez Exp $ +// $Id: confutils.js,v 1.38 2004-02-12 12:30:41 wez Exp $ var STDOUT = WScript.StdOut; var STDERR = WScript.StdErr; @@ -340,7 +340,10 @@ can be built that way. \ } var snapshot_build_exclusions = new Array( - 'debug', 'crt-debug', 'lzf-better-compression', 'php-build', 'snapshot-template' + 'debug', 'crt-debug', 'lzf-better-compression', + 'php-build', 'snapshot-template', + 'pcre-regex', 'fastcgi', 'force-cgi-redirect', + 'path-info-check', 'zts', 'ipv6' ); // Now set any defaults we might have missed out earlier @@ -351,6 +354,37 @@ can be built that way. \ analyzed = analyze_arg(arg.defval); shared = analyzed[0]; argval = analyzed[1]; + + // Don't trust a default "yes" answer for a non-core module + // in a snapshot build + if (PHP_SNAPSHOT_BUILD != "no" && argval == "yes" && !shared) { + var force; + + force = true; + for (j = 0; j < snapshot_build_exclusions.length; j++) { + if (snapshot_build_exclusions[j] == arg.optname) { + force = false; + break; + } + } + + if (force) { + /* now check if it is a core module */ + force = false; + for (j = 0; j < core_module_list.length; j++) { + if (core_module_list[j] == arg.optname) { + force = true; + break; + } + } + + if (!force) { + STDOUT.WriteLine("snapshot: forcing " + arg.arg + " shared"); + shared = true; + } + } + } + if (PHP_SNAPSHOT_BUILD != "no" && argval == "no") { var force; @@ -362,7 +396,7 @@ can be built that way. \ } } if (force) { - STDOUT.WriteLine("snapshot: forcing " + arg.arg + " on"); + STDOUT.WriteLine("snapshot: forcing " + arg.optname + " on"); argval = "yes"; shared = true; } |
