summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-01 00:22:04 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-01 00:22:04 +0000
commitf9d7b8ec335d082b0bc6c3dc680850b316dff160 (patch)
tree60c3b7b5f7648af6d790bde819c60127f80ef3dd
parent19e62f6764015f64229506dcaa131f4ddc52b93a (diff)
downloadchromium_src-f9d7b8ec335d082b0bc6c3dc680850b316dff160.zip
chromium_src-f9d7b8ec335d082b0bc6c3dc680850b316dff160.tar.gz
chromium_src-f9d7b8ec335d082b0bc6c3dc680850b316dff160.tar.bz2
Only skip the GRIT header writing on Windows. This will cause
resource only changes to rebuild lots of stuff on Mac and Linux, but since most of this is happening on Windows anyway, only optimize for Windows. This should make second builds faster since all the dependencies are up to date. Review URL: http://codereview.chromium.org/99265 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15023 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--tools/grit/grit/tool/build.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/grit/grit/tool/build.py b/tools/grit/grit/tool/build.py
index c2111ab..daabaf8 100644
--- a/tools/grit/grit/tool/build.py
+++ b/tools/grit/grit/tool/build.py
@@ -191,17 +191,18 @@ are exported to translation interchange files (e.g. XMB files), etc.
self.ProcessNode(self.res, output, outfile)
outfile.close()
- # Now copy from the temp file back to the real output, but only if the
- # real output doesn't exist or the contents of the file changed. This
- # prevents identical headers from being written and .cc files from
- # recompiling.
+ # Now copy from the temp file back to the real output, but on Windows,
+ # only if the real output doesn't exist or the contents of the file
+ # changed. This prevents identical headers from being written and .cc
+ # files from recompiling (which is painful on Windows).
if not os.path.exists(output.GetOutputFilename()):
os.rename(output.GetOutputFilename() + '.tmp',
output.GetOutputFilename())
else:
files_match = filecmp.cmp(output.GetOutputFilename(),
output.GetOutputFilename() + '.tmp')
- if output.GetType() != 'rc_header' or not files_match:
+ if (output.GetType() != 'rc_header' or not files_match
+ or sys.platform != 'win32'):
shutil.copy2(output.GetOutputFilename() + '.tmp',
output.GetOutputFilename())
os.remove(output.GetOutputFilename() + '.tmp')