Skip to content

Commit 9ecd238

Browse files
committed
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.
1 parent 4845b20 commit 9ecd238

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

win32/build/confutils.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
+----------------------------------------------------------------------+
1818
*/
1919

20-
// $Id: confutils.js,v 1.20 2003-12-19 12:50:11 wez Exp $
20+
// $Id: confutils.js,v 1.21 2003-12-19 16:55:59 wez Exp $
2121

2222
var STDOUT = WScript.StdOut;
2323
var STDERR = WScript.StdErr;
@@ -779,11 +779,19 @@ function generate_internal_functions()
779779
indata = infile.ReadAll();
780780
infile.Close();
781781

782-
outfile = FSO.CreateTextFile(WshShell.CurrentDirectory + "/main/internal_functions.c", true);
783-
784782
indata = indata.replace("@EXT_INCLUDE_CODE@", extension_include_code);
785783
indata = indata.replace("@EXT_MODULE_PTRS@", extension_module_ptrs);
786784

785+
if (FSO.FileExists("main/internal_functions.c")) {
786+
var origdata = file_get_contents("main/internal_functions.c");
787+
788+
if (origdata == indata) {
789+
STDOUT.WriteLine("\t[content unchanged; skipping]");
790+
return;
791+
}
792+
}
793+
794+
outfile = FSO.CreateTextFile(WshShell.CurrentDirectory + "/main/internal_functions.c", true);
787795
outfile.Write(indata);
788796
outfile.Close();
789797
}

0 commit comments

Comments
 (0)