summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Oberbrunner <garyo@oberbrunner.com>2010-07-04 20:21:57 (GMT)
committerGary Oberbrunner <garyo@oberbrunner.com>2010-07-04 20:21:57 (GMT)
commitde01f980b8b6d59088fdc739535cf12f050ed36b (patch)
treefbff330a72daa87f5887b46eafc39671ecddee59
parent18d1302e8531ac99b30fa16615b270d5e751745b (diff)
downloadSCons-de01f980b8b6d59088fdc739535cf12f050ed36b.zip
SCons-de01f980b8b6d59088fdc739535cf12f050ed36b.tar.gz
SCons-de01f980b8b6d59088fdc739535cf12f050ed36b.tar.bz2
Add .sx assembly files to preprocessed-assembly source scanner list. Closes issue 2573.
-rw-r--r--src/CHANGES.txt5
-rw-r--r--src/engine/SCons/Tool/__init__.py2
-rw-r--r--test/AS/ASPP.py15
3 files changed, 20 insertions, 2 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index a9d4372..0795195 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -7,6 +7,11 @@
RELEASE 2.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE
+ From Alexander Goomenyuk:
+
+ - Add .sx to assembly source scanner list so .sx files
+ get their header file dependencies detected.
+
From Arve Knudsen:
- Set module metadata when loading site_scons/site_init.py
diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py
index 9d9855b..5357959 100644
--- a/src/engine/SCons/Tool/__init__.py
+++ b/src/engine/SCons/Tool/__init__.py
@@ -62,7 +62,7 @@ CSuffixes = [".c", ".C", ".cxx", ".cpp", ".c++", ".cc",
".h", ".H", ".hxx", ".hpp", ".hh",
".F", ".fpp", ".FPP",
".m", ".mm",
- ".S", ".spp", ".SPP"]
+ ".S", ".spp", ".SPP", ".sx"]
DSuffixes = ['.d']
diff --git a/test/AS/ASPP.py b/test/AS/ASPP.py
index f8bea47..db699f8 100644
--- a/test/AS/ASPP.py
+++ b/test/AS/ASPP.py
@@ -114,6 +114,7 @@ env = Environment(LINK = r'%(_python_)s mylink.py',
CC = r'%(_python_)s myas.py')
env.Program(target = 'test1', source = 'test1.spp')
env.Program(target = 'test2', source = 'test2.SPP')
+env.Program(target = 'test3', source = 'test3.sx')
""" % locals())
test.write('test1.spp', r"""This is a .spp file.
@@ -126,13 +127,25 @@ test.write('test2.SPP', r"""This is a .SPP file.
#link
""")
+test.write('foo.h', r"""// this is foo.h
+""")
+
+test.write('test3.sx', r"""This is a .sx file.
+#include "foo.h"
+#as
+#link
+""")
+
test.run(arguments = '.', stderr = None)
test.fail_test(test.read('test1' + _exe) != "This is a .spp file.\n")
test.fail_test(test.read('test2' + _exe) != "This is a .SPP file.\n")
-
+# Ensure the source scanner was run on test3.sx by
+# checking for foo.h in the dependency tree output
+test.run(arguments = '. --tree=prune')
+test.fail_test("foo.h" not in test.stdout())
test.pass_test()