diff options
author | Gary Oberbrunner <garyo@oberbrunner.com> | 2011-05-30 14:23:24 (GMT) |
---|---|---|
committer | Gary Oberbrunner <garyo@oberbrunner.com> | 2011-05-30 14:23:24 (GMT) |
commit | 384ccd8cdf461a3b0933d164694d5d696d9437cf (patch) | |
tree | 9d07f3040db6e84208382e96b0a02066dd92271b /src | |
parent | b97b65360984b8769ea266b5412ee6ca789f71ce (diff) | |
download | SCons-384ccd8cdf461a3b0933d164694d5d696d9437cf.zip SCons-384ccd8cdf461a3b0933d164694d5d696d9437cf.tar.gz SCons-384ccd8cdf461a3b0933d164694d5d696d9437cf.tar.bz2 |
Handle DOS line endings in RC scanner. Fixes #2747.
Diffstat (limited to 'src')
-rw-r--r-- | src/CHANGES.txt | 3 | ||||
-rw-r--r-- | src/RELEASE.txt | 1 | ||||
-rw-r--r-- | src/engine/SCons/Scanner/RC.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Scanner/RCTests.py | 11 |
4 files changed, 16 insertions, 1 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index be557b7..7afc9d8 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -7,6 +7,9 @@ RELEASE 2.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE + From Anton Lazarev: + - Fix Windows resource compiler scanner to accept DOS line endings. + From Matthias: - Update MSVS documents to remove note indicating that only one project is currently supported per solution file. diff --git a/src/RELEASE.txt b/src/RELEASE.txt index 8cd46a9..6f71dcb 100644 --- a/src/RELEASE.txt +++ b/src/RELEASE.txt @@ -56,6 +56,7 @@ FIXES + - Windows resource compiler (RC) scanner now handles DOS line endings - Visual Studio project generation now works when CPPPATH contains Dir nodes - Visual Studio projects are regenerated when CPPPATH or CPPDEFINES change NOTE: this will cause all MSVS projects to be regenerated with this version. diff --git a/src/engine/SCons/Scanner/RC.py b/src/engine/SCons/Scanner/RC.py index f8313fb..437b861 100644 --- a/src/engine/SCons/Scanner/RC.py +++ b/src/engine/SCons/Scanner/RC.py @@ -40,7 +40,7 @@ def RCScan(): res_re= r'^(?:\s*#\s*(?:include)|' \ '.*?\s+(?:ICON|BITMAP|CURSOR|HTML|FONT|MESSAGETABLE|TYPELIB|REGISTRY|D3DFX)' \ '\s*.*?)' \ - '\s*(<|"| )([^>"\s]+)(?:[>" ])*$' + '\s*(<|"| )([^>"\s]+)(?:[>"\s])*$' resScanner = SCons.Scanner.ClassicCPP( "ResourceScanner", "$RCSUFFIXES", "CPPPATH", diff --git a/src/engine/SCons/Scanner/RCTests.py b/src/engine/SCons/Scanner/RCTests.py index 2d97df5..8802885 100644 --- a/src/engine/SCons/Scanner/RCTests.py +++ b/src/engine/SCons/Scanner/RCTests.py @@ -57,6 +57,7 @@ TEST_D3DFX D3DFX DISCARDABLE "testEffect.fx" """) +test.write('t3.rc','#include "t1.h"\r\n') # Create dummy include files headers = ['t1.h', @@ -144,12 +145,22 @@ class RCScannerTestCase2(unittest.TestCase): 'testregis.rgs','testtypelib.tlb'] deps_match(self, deps, headers) +class RCScannerTestCase3(unittest.TestCase): + def runTest(self): + path = [] + env = DummyEnvironment(RCSUFFIXES=['.rc','.rc2'], + CPPPATH=path) + s = SCons.Scanner.RC.RCScan() + deps = s(env.File('t3.rc'), env, path) + headers = ['t1.h'] + deps_match(self, deps, headers) def suite(): suite = unittest.TestSuite() suite.addTest(RCScannerTestCase1()) suite.addTest(RCScannerTestCase2()) + suite.addTest(RCScannerTestCase3()) return suite if __name__ == "__main__": |