wez             Thu Jan  8 16:53:49 2004 EDT

  Modified files:              
    /php-src/ext/simplexml      config.w32 
    /php-src/win32/build        buildconf.js confutils.js 
  Log:
  add optional dep on spl for simplexml.
  Fix dep handling in buildconf
  
Index: php-src/ext/simplexml/config.w32
diff -u php-src/ext/simplexml/config.w32:1.3 php-src/ext/simplexml/config.w32:1.4
--- php-src/ext/simplexml/config.w32:1.3        Mon Dec 22 08:16:40 2003
+++ php-src/ext/simplexml/config.w32    Thu Jan  8 16:53:48 2004
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.3 2003/12/22 13:16:40 wez Exp $
+// $Id: config.w32,v 1.4 2004/01/08 21:53:48 wez Exp $
 // vim:ft=javascript
 
 ARG_WITH("simplexml", "Simple XML support", "yes");
@@ -10,6 +10,7 @@
                ADD_FLAG("CFLAGS_SIMPLEXML", "/D LIBXML_STATIC");
        }
        ADD_EXTENSION_DEP('simplexml', 'libxml');
+       ADD_EXTENSION_DEP('simplexml', 'spl', true);
 }
 
 
Index: php-src/win32/build/buildconf.js
diff -u php-src/win32/build/buildconf.js:1.9 php-src/win32/build/buildconf.js:1.10
--- php-src/win32/build/buildconf.js:1.9        Thu Jan  8 12:33:29 2004
+++ php-src/win32/build/buildconf.js    Thu Jan  8 16:53:48 2004
@@ -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 @@
        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 @@
 {
        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;
Index: php-src/win32/build/confutils.js
diff -u php-src/win32/build/confutils.js:1.33 php-src/win32/build/confutils.js:1.34
--- php-src/win32/build/confutils.js:1.33       Thu Jan  8 12:33:29 2004
+++ php-src/win32/build/confutils.js    Thu Jan  8 16:53:48 2004
@@ -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 @@
 
 // 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)");

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to