diff options
-rw-r--r-- | src/CHANGES.txt | 3 | ||||
-rw-r--r-- | src/engine/SCons/Scanner/C.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Scanner/CTests.py | 18 |
3 files changed, 22 insertions, 1 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 61cdb44..0b1b03e 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -25,6 +25,9 @@ RELEASE X.XX - XXX - The -Q option suppressed too many messages; fix it so that it only suppresses the Reading/Building messages. + - Support #include when there's no space before the opening quote + or angle bracket. + RELEASE 0.92 - Wed, 20 Aug 2003 03:45:28 -0500 diff --git a/src/engine/SCons/Scanner/C.py b/src/engine/SCons/Scanner/C.py index 44007f9..c78fa4b 100644 --- a/src/engine/SCons/Scanner/C.py +++ b/src/engine/SCons/Scanner/C.py @@ -40,6 +40,6 @@ def CScan(fs = SCons.Node.FS.default_fs): ".h", ".H", ".hxx", ".hpp", ".hh", ".F", ".fpp", ".FPP"], "CPPPATH", - '^[ \t]*#[ \t]*(?:include|import)[ \t]+(<|")([^>"]+)(>|")', + '^[ \t]*#[ \t]*(?:include|import)[ \t]*(<|")([^>"]+)(>|")', fs = fs) return cs diff --git a/src/engine/SCons/Scanner/CTests.py b/src/engine/SCons/Scanner/CTests.py index 907ad64..3a5d308 100644 --- a/src/engine/SCons/Scanner/CTests.py +++ b/src/engine/SCons/Scanner/CTests.py @@ -157,6 +157,14 @@ int main() test.write([ 'repository', 'src', 'ddd.h'], "\n") +test.write('f5.c', """\ +#include\"f5a.h\" +#include<f5b.h> +""") + +test.write("f5a.h", "\n") +test.write("f5b.h", "\n") + # define some helpers: class DummyEnvironment: @@ -376,6 +384,15 @@ class CScannerTestCase13(unittest.TestCase): deps = s(make_node('f1.cpp'), env, path) headers = ['d1/f2.h', 'f1.h'] deps_match(self, deps, map(test.workpath, headers)) + +class CScannerTestCase14(unittest.TestCase): + def runTest(self): + env = DummyEnvironment([]) + s = SCons.Scanner.C.CScan() + path = s.path(env) + deps = s(make_node('f5.c'), env, path) + headers = ['f5a.h', 'f5b.h'] + deps_match(self, deps, map(test.workpath, headers)) def suite(): @@ -392,6 +409,7 @@ def suite(): suite.addTest(CScannerTestCase11()) suite.addTest(CScannerTestCase12()) suite.addTest(CScannerTestCase13()) + suite.addTest(CScannerTestCase14()) return suite if __name__ == "__main__": |