summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2004-01-08 21:53:48 +0000
committerWez Furlong <wez@php.net>2004-01-08 21:53:48 +0000
commit510dd7cca578e097a3ba7f615a19820c1337d29a (patch)
tree19911d4b312c5c2f7c27f781797c3167a4d4f686
parent3fc4dc44ae228c0eed2489dd82316babc4a44efa (diff)
downloadphp-git-510dd7cca578e097a3ba7f615a19820c1337d29a.tar.gz
add optional dep on spl for simplexml.
Fix dep handling in buildconf
-rw-r--r--ext/simplexml/config.w321
-rw-r--r--win32/build/buildconf.js16
-rw-r--r--win32/build/confutils.js14
3 files changed, 22 insertions, 9 deletions
diff --git a/ext/simplexml/config.w32 b/ext/simplexml/config.w32
index f6859d5b2c..26a87f1c14 100644
--- a/ext/simplexml/config.w32
+++ b/ext/simplexml/config.w32
@@ -10,6 +10,7 @@ if (PHP_SIMPLEXML == "yes" && PHP_LIBXML == "yes") {
ADD_FLAG("CFLAGS_SIMPLEXML", "/D LIBXML_STATIC");
}
ADD_EXTENSION_DEP('simplexml', 'libxml');
+ ADD_EXTENSION_DEP('simplexml', 'spl', true);
}
diff --git a/win32/build/buildconf.js b/win32/build/buildconf.js
index 1c28b420c0..b744fcd769 100644
--- a/win32/build/buildconf.js
+++ b/win32/build/buildconf.js
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: buildconf.js,v 1.9 2004-01-08 17:33:29 sniper Exp $ */
+/* $Id: buildconf.js,v 1.10 2004-01-08 21:53:48 wez Exp $ */
// This generates a configure script for win32 build
WScript.StdOut.WriteLine("Rebuilding configure.js");
@@ -53,7 +53,7 @@ function find_config_w32(dirname)
var fc = new Enumerator(f.SubFolders);
var c, i, ok, n;
var item = null;
- var re_dep_line = new RegExp("ADD_EXTENSION_DEP\\([^,]*\\s*,\\s*['\"]([^'\"]+)['\"]\\);", "gm");
+ var re_dep_line = new RegExp("ADD_EXTENSION_DEP\\([^,]*\\s*,\\s*['\"]([^'\"]+)['\"].*\\);", "gm");
for (; !fc.atEnd(); fc.moveNext())
{
@@ -108,17 +108,19 @@ function emit_dep_modules(module_names)
{
var i, mod_name, j;
var output = "";
+ var item = null;
for (i in module_names) {
mod_name = module_names[i];
- if (!MODULES.Exists(mod_name)) {
+ if (MODULES.Exists(mod_name)) {
+ item = MODULES.Item(mod_name);
+ MODULES.Remove(mod_name);
+ if (item.deps.length) {
+ output += emit_dep_modules(item.deps);
+ }
output += emit_module(item);
- continue;
}
-
- item = MODULES.Item(mod_name);
- output += emit_dep_modules(item.deps);
}
return output;
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index b07cf0cdfd..c199455553 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-// $Id: confutils.js,v 1.33 2004-01-08 17:33:29 sniper Exp $
+// $Id: confutils.js,v 1.34 2004-01-08 21:53:48 wez Exp $
var STDOUT = WScript.StdOut;
var STDERR = WScript.StdErr;
@@ -788,16 +788,26 @@ function file_get_contents(filename)
// Add a dependency on another extension, so that
// the dependencies are built before extname
-function ADD_EXTENSION_DEP(extname, dependson)
+function ADD_EXTENSION_DEP(extname, dependson, optional)
{
var EXT = extname.toUpperCase();
var DEP = dependson.toUpperCase();
+ if (optional) {
+ var dep_present = eval("PHP_" + DEP);
+
+ if (dep_present == "no")
+ return;
+ }
+
var dep_shared = eval("PHP_" + DEP + "_SHARED");
var ext_shared = eval("PHP_" + EXT + "_SHARED");
if (dep_shared) {
if (!ext_shared) {
+ if (optional) {
+ return;
+ }
ERROR("static " + extname + " cannot depend on shared " + dependson);
}
ADD_FLAG("LDFLAGS_" + EXT, "/libpath:$(BUILD_DIR)");