summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-14 02:26:30 +0000
committersgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-14 02:26:30 +0000
commit8322ac6958d1eed444e4f681d4f1ab6bfff4a3f9 (patch)
treea3b17de69b2f15828c8da56bc4be36fd8182e109
parent279c4199ba7327239de927765e74c64a1b8779af (diff)
downloadchromium_src-8322ac6958d1eed444e4f681d4f1ab6bfff4a3f9.zip
chromium_src-8322ac6958d1eed444e4f681d4f1ab6bfff4a3f9.tar.gz
chromium_src-8322ac6958d1eed444e4f681d4f1ab6bfff4a3f9.tar.bz2
Fixes for Visual Studio solution + project file generation:
* Fix the grit tool so it works with Repository() directories (and tap gspencer to upstream the changes). * Fix the evaluation of $PRE_EVALUATE_DIRS, which was interfering with sucking up the source files for listing in the .vcproj files. * Set AlwaysBuild() on the project files so they're always evaluated for up-to-dateness when 'all_solutions' is the target. Review URL: http://codereview.chromium.org/10725 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5440 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--build/SConscript.main4
-rw-r--r--site_scons/site_tools/component_setup.py2
-rw-r--r--tools/grit/grit/scons.py18
3 files changed, 20 insertions, 4 deletions
diff --git a/build/SConscript.main b/build/SConscript.main
index cf59228..a06448b 100644
--- a/build/SConscript.main
+++ b/build/SConscript.main
@@ -775,8 +775,12 @@ p = vs_env.ComponentVSDirProject(
(None, '$DESTINATION_ROOT'),
('src', '$CHROME_SRC_DIR'),
],
+ COMPONENT_VS_PROJECT_DIR = '$MAIN_DIR',
)
+# Always try to (re)build the project files when requested.
+vs_env.AlwaysBuild(p)
+
vs_env.ComponentVSSolution(
'chrome_solution',
[
diff --git a/site_scons/site_tools/component_setup.py b/site_scons/site_tools/component_setup.py
index e3c4574..a9ec5c0 100644
--- a/site_scons/site_tools/component_setup.py
+++ b/site_scons/site_tools/component_setup.py
@@ -71,7 +71,7 @@ def PreEvaluateVariables(env):
env: Environment for the current build mode.
"""
# Convert directory variables to strings
- for var in env.SubstList2('PRE_EVALUATE_DIRS'):
+ for var in env.SubstList2('$PRE_EVALUATE_DIRS'):
env[var] = str(env.Dir('$' + var))
diff --git a/tools/grit/grit/scons.py b/tools/grit/grit/scons.py
index 12516b0..0bc759a 100644
--- a/tools/grit/grit/scons.py
+++ b/tools/grit/grit/scons.py
@@ -22,9 +22,17 @@ def _SourceToFile(source):
# Get the filename of the source. The 'source' parameter can be a string,
# a "node", or a list of strings or nodes.
if isinstance(source, types.ListType):
- source = str(source[0])
+ # TODO(gspencer): Had to add the .rfile() method to the following
+ # line to get this to work with Repository() directories.
+ # Get this functionality folded back into the upstream grit tool.
+ #source = str(source[0])
+ source = str(source[0].rfile())
else:
- source = str(source)
+ # TODO(gspencer): Had to add the .rfile() method to the following
+ # line to get this to work with Repository() directories.
+ # Get this functionality folded back into the upstream grit tool.
+ #source = str(source))
+ source = str(source.rfile())
return source
@@ -65,7 +73,11 @@ def _Emitter(target, source, env):
from grit import util
from grit import grd_reader
- base_dir = util.dirname(str(target[0]))
+ # TODO(gspencer): Had to use .abspath, not str(target[0]), to get
+ # this to work with Repository() directories.
+ # Get this functionality folded back into the upstream grit tool.
+ #base_dir = util.dirname(str(target[0]))
+ base_dir = util.dirname(target[0].abspath)
grd = grd_reader.Parse(_SourceToFile(source), debug=_IsDebugEnabled())