summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-30 00:53:38 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-30 00:53:38 +0000
commit2425b82c5549f8c695e01a7c8c09ddccf508863d (patch)
tree54369f20bff73027a34ff1908aad3f6b2c8c4298 /build
parent347aa1e03a4f65233b76c5d58c4111f82030a803 (diff)
downloadchromium_src-2425b82c5549f8c695e01a7c8c09ddccf508863d.zip
chromium_src-2425b82c5549f8c695e01a7c8c09ddccf508863d.tar.gz
chromium_src-2425b82c5549f8c695e01a7c8c09ddccf508863d.tar.bz2
The buildbots compile into src/build/{Debug,Release} but this script
assumes that the build output is in src/chrome/{Debug,Release}. Update the clobber script to look in both places. Review URL: http://codereview.chromium.org/255015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27580 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r--build/win/clobber_generated_headers.py36
1 files changed, 20 insertions, 16 deletions
diff --git a/build/win/clobber_generated_headers.py b/build/win/clobber_generated_headers.py
index 8c5521f..d6bae89 100644
--- a/build/win/clobber_generated_headers.py
+++ b/build/win/clobber_generated_headers.py
@@ -43,21 +43,25 @@ for path in sys.argv[1:]:
continue
output_files = [node.GetOutputFilename() for node in root.GetOutputFiles()]
output_headers = [file for file in output_files if file.endswith('.h')]
- for build_type in ('Debug', 'Release'):
- build_path = os.path.join(_SRC_PATH, 'chrome', build_type)
-
- # We guess target file output based on path of the grd file (the first
- # path component after 'src').
- intermediate_path = os.path.join(build_path, 'obj',
- 'global_intermediate', path_components[1])
-
- for header in output_headers:
- full_path = os.path.normpath(os.path.join(intermediate_path, header))
- if os.path.exists(full_path):
- try:
- os.remove(full_path)
- except OSError, e:
+ # Build output can be in any subdirectory of src.
+ paths = [d for d in os.listdir(_SRC_PATH) if
+ os.path.isdir(os.path.join(_SRC_PATH, d))]
+ for out_dir in paths:
+ for build_type in ('Debug', 'Release'):
+ build_path = os.path.join(_SRC_PATH, out_dir, build_type)
+
+ # We guess target file output based on path of the grd file (the first
+ # path component after 'src').
+ intermediate_path = os.path.join(build_path, 'obj',
+ 'global_intermediate', path_components[1])
+
+ for header in output_headers:
+ full_path = os.path.normpath(os.path.join(intermediate_path, header))
+ if os.path.exists(full_path):
+ try:
+ os.remove(full_path)
+ except OSError, e:
fmt = 'Could not remove %s: %s. Continuing.\n'
sys.stderr.write(fmt % (full_path, e))
- else:
- print 'Clobbered ' + full_path
+ else:
+ print 'Clobbered ' + full_path