Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(710)

Unified Diff: tools/grit/grit/tool/build.py

Issue 99265: Only skip the GRIT header writing on Windows. This will cause (Closed)
Patch Set: Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/grit/grit/tool/build.py
diff --git a/tools/grit/grit/tool/build.py b/tools/grit/grit/tool/build.py
index c2111ab5e395453aba4f904efc5c6fdb4374cd2f..daabaf83b634475b2c757c804df1a1e5307e23c5 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')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698