summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2003-12-19 16:55:59 +0000
committerWez Furlong <wez@php.net>2003-12-19 16:55:59 +0000
commit9ecd238b6bb90cba8188bcd4174ecf0a7395e103 (patch)
treefdbb0d231b7541ca731d6f5e75268e6632bae153
parent4845b205fc4045660e51efc41502a4a845531db2 (diff)
downloadphp-git-9ecd238b6bb90cba8188bcd4174ecf0a7395e103.tar.gz
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.
-rw-r--r--win32/build/confutils.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index 5c34f89f3c..b697fc1f2e 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -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 @@ function generate_internal_functions()
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();
}