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

Unified Diff: tools/grit/grit/scons.py

Issue 24011: chrome_resources take 2 (Closed)
Patch Set: rebase Created 11 years, 10 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 | « tools/grit/build/grit_resources.rules ('k') | tools/grit/grit/tool/build.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/grit/grit/scons.py
diff --git a/tools/grit/grit/scons.py b/tools/grit/grit/scons.py
index 89b8837e604f32ca757b597426d07395a8ac0600..ba1c6c12fec7dbb7f5b347d5270ed70ed813e484 100644
--- a/tools/grit/grit/scons.py
+++ b/tools/grit/grit/scons.py
@@ -84,10 +84,17 @@ def _Emitter(target, source, env):
target = []
lang_folders = {}
+ # TODO(tc): new_header_output is a hack while we migrate to
+ # grit_derived_sources/grit/ as the new output dir for headers.
+ new_header_output = None
# Add all explicitly-specified output files
for output in grd.GetOutputFiles():
path = os.path.join(base_dir, output.GetFilename())
target.append(path)
+
+ if path.endswith('.h'):
+ path, filename = os.path.split(path)
+ new_header_output = os.path.join(path, 'grit', filename)
if _IsDebugEnabled():
print "GRIT: Added target %s" % path
if output.attrs['lang'] != '':
@@ -108,6 +115,9 @@ def _Emitter(target, source, env):
if _IsDebugEnabled():
print "GRIT: Added target %s" % path
+ if new_header_output:
+ target.append(new_header_output)
+
# GRIT is not thread safe so we should only build one grit target at a time.
# We tell scons about this by making a fake side effect target.
env.SideEffect('grit_lock', target)
« no previous file with comments | « tools/grit/build/grit_resources.rules ('k') | tools/grit/grit/tool/build.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698