From 3104e0231aa7c6958797fc3017d16a73e3fe0d90 Mon Sep 17 00:00:00 2001 From: stevenknight Date: Thu, 17 Apr 2003 01:46:02 +0000 Subject: [PATCH] Support the #import C preprocessor directive. (Greg Spencer) git-svn-id: http://scons.tigris.org/svn/scons/trunk@648 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- src/CHANGES.txt | 4 ++++ src/engine/SCons/Scanner/C.py | 2 +- src/engine/SCons/Scanner/CTests.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 11658ffa..eb385e33 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -65,6 +65,10 @@ RELEASE 0.14 - XXX - Add support for using Ghostscript to convert Postscript to PDF files. + From Greg Spencer: + + - Support the C preprocessor #import statement. + RELEASE 0.13 - Mon, 31 Mar 2003 20:22:00 -0600 diff --git a/src/engine/SCons/Scanner/C.py b/src/engine/SCons/Scanner/C.py index b59e66b5..c06774d2 100644 --- a/src/engine/SCons/Scanner/C.py +++ b/src/engine/SCons/Scanner/C.py @@ -38,7 +38,7 @@ import SCons.Scanner import SCons.Util import SCons.Warnings -include_re = re.compile('^[ \t]*#[ \t]*include[ \t]+(<|")([^>"]+)(>|")', re.M) +include_re = re.compile('^[ \t]*#[ \t]*(?:include|import)[ \t]+(<|")([^>"]+)(>|")', re.M) def CScan(fs = SCons.Node.FS.default_fs): """Return a prototype Scanner instance for scanning source files diff --git a/src/engine/SCons/Scanner/CTests.py b/src/engine/SCons/Scanner/CTests.py index c865e6e2..907ad64f 100644 --- a/src/engine/SCons/Scanner/CTests.py +++ b/src/engine/SCons/Scanner/CTests.py @@ -52,7 +52,7 @@ test.write('f2.cpp',""" #include \"d1/f1.h\" #include #include \"f1.h\" -#include +#import int main() { -- 2.26.2