diff options
author | Steven Knight <knight@baldmt.com> | 2005-02-28 00:05:55 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2005-02-28 00:05:55 (GMT) |
commit | c0482ca4acb368e7b7e7509e69f0112023edd9f4 (patch) | |
tree | c18f80c3df952d4caf5417febb0320ceaacb01c7 | |
parent | 044cbbb97a8df13cc3bf67e9e0188328862ba49b (diff) | |
download | SCons-c0482ca4acb368e7b7e7509e69f0112023edd9f4.zip SCons-c0482ca4acb368e7b7e7509e69f0112023edd9f4.tar.gz SCons-c0482ca4acb368e7b7e7509e69f0112023edd9f4.tar.bz2 |
Add support for Objective C/C++ .m and .mm file extensions. (Timothee Besset)
-rw-r--r-- | doc/man/scons.1 | 8 | ||||
-rw-r--r-- | src/CHANGES.txt | 5 | ||||
-rw-r--r-- | src/engine/SCons/Tool/__init__.py | 1 | ||||
-rw-r--r-- | src/engine/SCons/Tool/c++.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Tool/cc.py | 2 |
5 files changed, 15 insertions, 3 deletions
diff --git a/doc/man/scons.1 b/doc/man/scons.1 index d26abdc..ae57f82 100644 --- a/doc/man/scons.1 +++ b/doc/man/scons.1 @@ -2066,6 +2066,8 @@ Source files must have one of the following extensions: .FOR Fortran file .fpp Fortran file + C pre-processor .FPP Fortran file + C pre-processor + .m Objective C file + .mm Objective C++ file .s assembly language file .S WIN32: assembly language file POSIX: assembly language file + C pre-processor @@ -4930,6 +4932,7 @@ The default list is: [".c", ".C", ".cxx", ".cpp", ".c++", ".cc", ".h", ".H", ".hxx", ".hpp", ".hh", ".F", ".fpp", ".FPP", + ".m", ".mm", ".S", ".spp", ".SPP"] .EE @@ -4975,7 +4978,10 @@ SCons also treats files with the suffixes .IR .c++ , and .I .C++ -as C++ files. +as C++ files, +and files with +.I .mm +suffixes as Objective C++ files. On case-sensitive systems (Linux, UNIX, and other POSIX-alikes), SCons also treats .I .C diff --git a/src/CHANGES.txt b/src/CHANGES.txt index ae19676..4124c7c 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -25,6 +25,11 @@ RELEASE 0.97 - XXX - Allow Tools found on a toolpath to import Python modules from their local directory. + From Timothee Besset: + + - Add support for Objective C/C++ .m and .mm file suffixes (for + Mac OS X). + From Steve Christensen: - Handle exceptions from Python functions as build actions. diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py index 7010e1c..d9b1c30 100644 --- a/src/engine/SCons/Tool/__init__.py +++ b/src/engine/SCons/Tool/__init__.py @@ -55,6 +55,7 @@ SourceFileScanner = SCons.Scanner.Scanner({}, name='SourceFileScanner') CSuffixes = [".c", ".C", ".cxx", ".cpp", ".c++", ".cc", ".h", ".H", ".hxx", ".hpp", ".hh", ".F", ".fpp", ".FPP", + ".m", ".mm", ".S", ".spp", ".SPP"] DSuffixes = ['.d'] diff --git a/src/engine/SCons/Tool/c++.py b/src/engine/SCons/Tool/c++.py index 10bb1ac..90b01ae 100644 --- a/src/engine/SCons/Tool/c++.py +++ b/src/engine/SCons/Tool/c++.py @@ -40,7 +40,7 @@ import SCons.Util compilers = ['CC', 'c++'] -CXXSuffixes = ['.cpp', '.cc', '.cxx', '.c++', '.C++'] +CXXSuffixes = ['.cpp', '.cc', '.cxx', '.c++', '.C++', '.mm'] if SCons.Util.case_sensitive_suffixes('.c', '.C'): CXXSuffixes.append('.C') diff --git a/src/engine/SCons/Tool/cc.py b/src/engine/SCons/Tool/cc.py index 56c723d..8fb9e26 100644 --- a/src/engine/SCons/Tool/cc.py +++ b/src/engine/SCons/Tool/cc.py @@ -36,7 +36,7 @@ import SCons.Tool import SCons.Defaults import SCons.Util -CSuffixes = ['.c'] +CSuffixes = ['.c', '.m'] if not SCons.Util.case_sensitive_suffixes('.c', '.C'): CSuffixes.append('.C') |