summaryrefslogtreecommitdiffstats
path: root/site_scons
diff options
context:
space:
mode:
authorbradnelson@chromium.org <bradnelson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-05 02:37:37 +0000
committerbradnelson@chromium.org <bradnelson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-05 02:37:37 +0000
commitee7dee9d799e82617b75da1a95ac365dc34f4e66 (patch)
tree7d5c71cd1942680e9db29998b64f025b551081df /site_scons
parent38beb36adc653c9b2da278eb9e12bc7c3f8bb7b0 (diff)
downloadchromium_src-ee7dee9d799e82617b75da1a95ac365dc34f4e66.zip
chromium_src-ee7dee9d799e82617b75da1a95ac365dc34f4e66.tar.gz
chromium_src-ee7dee9d799e82617b75da1a95ac365dc34f4e66.tar.bz2
Adding better project generation (source and build targets).
Adding fix to targets_msvs to work with chrome hammer.bat in depot_tools. Review URL: http://codereview.chromium.org/9149 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4734 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'site_scons')
-rwxr-xr-xsite_scons/site_tools/component_targets_msvs.py9
-rw-r--r--site_scons/site_tools/visual_studio_solution.py2
2 files changed, 9 insertions, 2 deletions
diff --git a/site_scons/site_tools/component_targets_msvs.py b/site_scons/site_tools/component_targets_msvs.py
index 57be5b3..e86de89 100755
--- a/site_scons/site_tools/component_targets_msvs.py
+++ b/site_scons/site_tools/component_targets_msvs.py
@@ -105,7 +105,9 @@ def ComponentVSProjectBuilder(target, source, env):
project_file = target[0].path
project_to_main = env.RelativePath(target[0].dir, env.Dir('$MAIN_DIR'),
sep='/')
- hammer_bat = '$(ProjectDir)/%s/hammer.bat' % project_to_main
+
+ env_hammer_bat = env.Clone(VS_PROJECT_TO_MAIN_DIR=project_to_main)
+ hammer_bat = env_hammer_bat.subst('$COMPONENT_VS_PROJECT_SCRIPT_PATH', raw=1)
# Project header
xml_impl = xml.dom.getDOMImplementation()
@@ -433,6 +435,10 @@ def generate(env):
COMPONENT_VS_PROJECT_DIR='$COMPONENT_VS_SOLUTION_DIR/projects',
COMPONENT_VS_SOLUTION_SUFFIX='.sln',
COMPONENT_VS_PROJECT_SUFFIX='.vcproj',
+ COMPONENT_VS_PROJECT_SCRIPT_NAME = 'hammer.bat',
+ COMPONENT_VS_PROJECT_SCRIPT_PATH = (
+ '$$(ProjectDir)/$VS_PROJECT_TO_MAIN_DIR/'
+ '$COMPONENT_VS_PROJECT_SCRIPT_NAME'),
)
AddTargetGroup('all_solutions', 'solutions can be built')
@@ -441,6 +447,7 @@ def generate(env):
vcprojaction = SCons.Script.Action(ComponentVSProjectBuilder, varlist=[
'TARGET_NAME',
'TARGET_PATH',
+ 'COMPONENT_VS_PROJECT_SCRIPT_PATH',
])
vcprojbuilder = SCons.Script.Builder(
action=vcprojaction,
diff --git a/site_scons/site_tools/visual_studio_solution.py b/site_scons/site_tools/visual_studio_solution.py
index 4c18d23..1e46767 100644
--- a/site_scons/site_tools/visual_studio_solution.py
+++ b/site_scons/site_tools/visual_studio_solution.py
@@ -71,7 +71,7 @@ def Solution(env, solution_name,
build_targets = [e.subst('$TARGET_ROOT') for e in environments]
# pick out sources, headers, and resources
sources, headers, resources, others = env.GatherInputs(
- [SCons.Script.Dir('$DESTINATION_ROOT')],
+ [env.Dir('$DESTINATION_ROOT')],
['.+\\.(c|cc|m|mm|cpp)$', # source files
'.+\\.(h|hh|hpp)$', # header files
'.+\\.(rc)$', # resource files