1. SCons
  2. Core
  3. SCons

Commits

Gary Oberbrunner  committed dddac35

Add .sx assembly files to preprocessed-assembly source scanner list. Closes issue 2573.

  • Participants
  • Parent commits 8ddf618
  • Branches default

Comments (0)

Files changed (3)

File src/CHANGES.txt

View file
  • Ignore whitespace
 
 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

File src/engine/SCons/Tool/__init__.py

View file
  • Ignore whitespace
              ".h", ".H", ".hxx", ".hpp", ".hh",
              ".F", ".fpp", ".FPP",
              ".m", ".mm",
-             ".S", ".spp", ".SPP"]
+             ".S", ".spp", ".SPP", ".sx"]
 
 DSuffixes = ['.d']
 

File test/AS/ASPP.py

View file
  • Ignore whitespace
                   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.
 #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()