From: Wez Furlong Date: Fri, 19 Dec 2003 16:55:59 +0000 (+0000) Subject: don't overwrite internal_functions.c if the content did not change; X-Git-Tag: php-5.0.0b3RC2~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9ecd238b6bb90cba8188bcd4174ecf0a7395e103;p=php 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. --- 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(); }