summaryrefslogtreecommitdiffstats
path: root/site_scons
diff options
context:
space:
mode:
Diffstat (limited to 'site_scons')
-rw-r--r--site_scons/site_tools/_Node_MSVS.py10
-rw-r--r--site_scons/site_tools/chromium_builders.py28
2 files changed, 35 insertions, 3 deletions
diff --git a/site_scons/site_tools/_Node_MSVS.py b/site_scons/site_tools/_Node_MSVS.py
index b421de2..e0876ba 100644
--- a/site_scons/site_tools/_Node_MSVS.py
+++ b/site_scons/site_tools/_Node_MSVS.py
@@ -963,6 +963,9 @@ class _MSVSProject(SCons.Node.FS.File):
base_tool = self.cl_to_tool(base_cl)
file_tool = self.cl_to_tool(file_cl)
+ if not base_tool or not_file_tool:
+ return
+
file_tool.diff(base_tool)
self.AddFileConfig(source, name, tools=[file_tool])
@@ -985,7 +988,12 @@ class _MSVSProject(SCons.Node.FS.File):
if default_tool:
tool.diff(default_tool)
else:
- print "no tool for %r" % bt_cl[0]
+ # TODO(sgk): print a message unconditionally is too
+ # verbose for things like Python function actions,
+ # but doing nothing runs the risk of burying problems.
+ # Work out a better solution.
+ #print "no tool for %r" % bt_cl[0]
+ pass
for t in bt.sources:
e = t.get_build_env()
additional_files = SCons.Util.UniqueList()
diff --git a/site_scons/site_tools/chromium_builders.py b/site_scons/site_tools/chromium_builders.py
index 7ee8928..ff25bde 100644
--- a/site_scons/site_tools/chromium_builders.py
+++ b/site_scons/site_tools/chromium_builders.py
@@ -8,6 +8,8 @@ wrappers around Hammer builders. This gives us a central place for any
customization we need to make to the different things we build.
"""
+from SCons.Script import *
+
import SCons.Node
import _Node_MSVS as MSVS
@@ -103,12 +105,34 @@ def ChromeMSVSFolder(env, *args, **kw):
def ChromeMSVSProject(env, *args, **kw):
if not env.Bit('msvs'):
return Null()
- return env.MSVSProject(*args, **kw)
+ try:
+ dest = kw['dest']
+ except KeyError:
+ dest = None
+ else:
+ del kw['dest']
+ result = env.MSVSProject(*args, **kw)
+ env.AlwaysBuild(result)
+ if dest:
+ i = env.Command(dest, result, Copy('$TARGET', '$SOURCE'))
+ Alias('msvs', i)
+ return result
def ChromeMSVSSolution(env, *args, **kw):
if not env.Bit('msvs'):
return Null()
- return env.MSVSSolution(*args, **kw)
+ try:
+ dest = kw['dest']
+ except KeyError:
+ dest = None
+ else:
+ del kw['dest']
+ result = env.MSVSSolution(*args, **kw)
+ env.AlwaysBuild(result)
+ if dest:
+ i = env.Command(dest, result, Copy('$TARGET', '$SOURCE'))
+ Alias('msvs', i)
+ return result
def generate(env):
env.AddMethod(ChromeProgram)