summaryrefslogtreecommitdiffstats
path: root/third_party/scons/scons-local/SCons/Tool/msvc.py
diff options
context:
space:
mode:
authorbradnelson@google.com <bradnelson@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-30 00:31:29 +0000
committerbradnelson@google.com <bradnelson@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-30 00:31:29 +0000
commit282e2f7d5da27717e6fe05abd482237db0019e01 (patch)
tree6cc7563bc98506f67c1a0b2fc2b6113cdd1c9dfe /third_party/scons/scons-local/SCons/Tool/msvc.py
parentc91a523e35cbbf233f82ae17a340b92459da5103 (diff)
downloadchromium_src-282e2f7d5da27717e6fe05abd482237db0019e01.zip
chromium_src-282e2f7d5da27717e6fe05abd482237db0019e01.tar.gz
chromium_src-282e2f7d5da27717e6fe05abd482237db0019e01.tar.bz2
Moving to scons 1.1.0
Review URL: http://codereview.chromium.org/8900 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4197 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/scons/scons-local/SCons/Tool/msvc.py')
-rw-r--r--third_party/scons/scons-local/SCons/Tool/msvc.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/third_party/scons/scons-local/SCons/Tool/msvc.py b/third_party/scons/scons-local/SCons/Tool/msvc.py
index b0b7146..e253528 100644
--- a/third_party/scons/scons-local/SCons/Tool/msvc.py
+++ b/third_party/scons/scons-local/SCons/Tool/msvc.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/msvc.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/msvc.py 3603 2008/10/10 05:46:45 scons"
import os.path
import re
@@ -45,6 +45,7 @@ import SCons.Tool
import SCons.Tool.msvs
import SCons.Util
import SCons.Warnings
+import SCons.Scanner.RC
CSuffixes = ['.c', '.C']
CXXSuffixes = ['.cc', '.cpp', '.cxx', '.c++', '.C++']
@@ -660,13 +661,17 @@ pch_action = SCons.Action.Action('$PCHCOM', '$PCHCOMSTR')
pch_builder = SCons.Builder.Builder(action=pch_action, suffix='.pch',
emitter=pch_emitter,
source_scanner=SCons.Tool.SourceFileScanner)
-res_action = SCons.Action.Action('$RCCOM', '$RCCOMSTR')
+
+
+# Logic to build .rc files into .res files (resource files)
+res_scanner = SCons.Scanner.RC.RCScan()
+res_action = SCons.Action.Action('$RCCOM', '$RCCOMSTR')
res_builder = SCons.Builder.Builder(action=res_action,
src_suffix='.rc',
suffix='.res',
src_builder=[],
- source_scanner=SCons.Tool.SourceFileScanner)
-SCons.Tool.SourceFileScanner.add_scanner('.rc', SCons.Defaults.CScan)
+ source_scanner=res_scanner)
+
def generate(env):
"""Add Builders and construction variables for MSVC++ to an Environment."""
@@ -711,6 +716,7 @@ def generate(env):
env['RC'] = 'rc'
env['RCFLAGS'] = SCons.Util.CLVar('')
+ env['RCSUFFIXES']=['.rc','.rc2']
env['RCCOM'] = '$RC $_CPPDEFFLAGS $_CPPINCFLAGS $RCFLAGS /fo$TARGET $SOURCES'
env['BUILDERS']['RES'] = res_builder
env['OBJPREFIX'] = ''