summaryrefslogtreecommitdiff
path: root/win32/build/buildconf.js
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2004-02-12 12:30:41 +0000
committerWez Furlong <wez@php.net>2004-02-12 12:30:41 +0000
commit08a1b6c476ad0df7db0535e7ca451bfc46c51ac6 (patch)
treeaa9ca78ae4c1d63cf887fe50a1cb0973e63eb79b /win32/build/buildconf.js
parent7d3215d33321173c58db4d86b7398e16c5c55d13 (diff)
downloadphp-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/buildconf.js')
-rw-r--r--win32/build/buildconf.js29
1 files changed, 28 insertions, 1 deletions
diff --git a/win32/build/buildconf.js b/win32/build/buildconf.js
index b744fcd769..a73094258c 100644
--- a/win32/build/buildconf.js
+++ b/win32/build/buildconf.js
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: buildconf.js,v 1.10 2004-01-08 21:53:48 wez Exp $ */
+/* $Id: buildconf.js,v 1.11 2004-02-12 12:30:41 wez Exp $ */
// This generates a configure script for win32 build
WScript.StdOut.WriteLine("Rebuilding configure.js");
@@ -99,6 +99,30 @@ function find_config_w32(dirname)
}
}
+// Emit core modules array. This is used by a snapshot
+// build to override a default "yes" value so that external
+// modules don't break the build by becoming statically compiled
+function emit_core_module_list()
+{
+ var module_names = (new VBArray(MODULES.Keys())).toArray();
+ var i, mod_name, j;
+ var item;
+ var output = "";
+
+ C.WriteLine("core_module_list = new Array(");
+
+ // first, look for modules with empty deps; emit those first
+ for (i in module_names) {
+ mod_name = module_names[i];
+ C.WriteLine("\"" + mod_name.replace(/_/g, "-") + "\",");
+ }
+
+ C.WriteLine("false // dummy");
+
+ C.WriteLine(");");
+}
+
+
function emit_module(item)
{
return item.dir_line + item.content;
@@ -168,11 +192,14 @@ modules = file_get_contents("win32/build/config.w32");
find_config_w32(".");
find_config_w32("sapi");
find_config_w32("ext");
+emit_core_module_list();
+
find_config_w32("pecl");
find_config_w32("..\\pecl");
find_config_w32("pecl\\rpc");
find_config_w32("..\\pecl\\rpc");
+
// Now generate contents of module based on MODULES, chasing dependencies
// to ensure that dependent modules are emitted first
modules += gen_modules();