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

Side by Side Diff: build/win/clobber_generated_headers.py

Issue 164173: Cosmetic fixes to clobber_generated_headers.py:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # This script helps workaround IncrediBuild problem on Windows. 6 # This script helps workaround IncrediBuild problem on Windows.
7 # See http://crbug.com/17706. 7 # See http://crbug.com/17706.
8 8
9 import os 9 import os
10 import sys 10 import sys
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 output_headers = [file for file in output_files if file.endswith('.h')] 46 output_headers = [file for file in output_files if file.endswith('.h')]
47 for build_type in ('Debug', 'Release'): 47 for build_type in ('Debug', 'Release'):
48 build_path = os.path.join(_SRC_PATH, 'chrome', build_type) 48 build_path = os.path.join(_SRC_PATH, 'chrome', build_type)
49 49
50 # We guess target file output based on path of the grd file (the first 50 # We guess target file output based on path of the grd file (the first
51 # path component after 'src'). 51 # path component after 'src').
52 intermediate_path = os.path.join(build_path, 'obj', 52 intermediate_path = os.path.join(build_path, 'obj',
53 'global_intermediate', path_components[1]) 53 'global_intermediate', path_components[1])
54 54
55 for header in output_headers: 55 for header in output_headers:
56 full_path = os.path.join(intermediate_path, header) 56 full_path = os.path.normpath(os.path.join(intermediate_path, header))
57 try: 57 if os.path.exists(full_path):
58 os.remove(full_path) 58 try:
59 print 'Clobbered ' + full_path 59 os.remove(full_path)
60 except OSError: 60 except OSError, e:
61 print 'Could not remove ' + full_path + '. Continuing.' 61 fmt = 'Could not remove %s: %s. Continuing.\n'
62 sys.stderr.write(fmt % (full_path, e))
63 else:
64 print 'Clobbered ' + full_path
OLDNEW
« 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