wez             Fri Dec 19 11:56:00 2003 EDT

  Modified files:              
    /php-src/win32/build        confutils.js 
  Log:
  don't overwrite internal_functions.c if the content did not change;
  this saves re-linking php*.dll when you add shared extensions to
  your config.
  
Index: php-src/win32/build/confutils.js
diff -u php-src/win32/build/confutils.js:1.20 php-src/win32/build/confutils.js:1.21
--- php-src/win32/build/confutils.js:1.20       Fri Dec 19 07:50:11 2003
+++ php-src/win32/build/confutils.js    Fri Dec 19 11:55:59 2003
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-// $Id: confutils.js,v 1.20 2003/12/19 12:50:11 wez Exp $
+// $Id: confutils.js,v 1.21 2003/12/19 16:55:59 wez Exp $
 
 var STDOUT = WScript.StdOut;
 var STDERR = WScript.StdErr;
@@ -779,11 +779,19 @@
        indata = infile.ReadAll();
        infile.Close();
        
-       outfile = FSO.CreateTextFile(WshShell.CurrentDirectory + 
"/main/internal_functions.c", true);
-
        indata = indata.replace("@EXT_INCLUDE_CODE@", extension_include_code);
        indata = indata.replace("@EXT_MODULE_PTRS@", extension_module_ptrs);
 
+       if (FSO.FileExists("main/internal_functions.c")) {
+               var origdata = file_get_contents("main/internal_functions.c");
+
+               if (origdata == indata) {
+                       STDOUT.WriteLine("\t[content unchanged; skipping]");
+                       return;
+               }
+       }
+
+       outfile = FSO.CreateTextFile(WshShell.CurrentDirectory + 
"/main/internal_functions.c", true);
        outfile.Write(indata);
        outfile.Close();
 }

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

Reply via email to