- WIN32 portability fixes in tests.
+ - Allow the list of variables exported to an SConscript file to be
+ a UserList, too.
+
From Anthony Roach:
- Make the scons script return an error code on failures.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/SConscript.py __REVISION__ __DATE__ __DEVELOPER__"
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import SCons.Errors
import SCons.Builder
import SCons.Defaults
+import SCons.Environment
+import SCons.Errors
import SCons.Node
import SCons.Node.FS
-import SCons.Environment
+import SCons.Util
+
import string
import sys
self.exports = {} # exports from the calling SConscript
try:
- if type(exports) == type([]):
+ if SCons.Util.is_List(exports):
for export in exports:
self.exports[export] = stack[-1].globals[export]
else:
assert foo == "subdir/SConscript foo"
SConscript('SConscript5')
+
+import UserList
+x7 = "SConstruct x7"
+x8 = "SConstruct x8"
+x9 = SConscript('SConscript6', UserList.UserList(["x7", "x8"]))
+assert x9 == "SConscript6 x9"
""")
test.write('SConscript', """
""")
-
test.write('SConscript2', """
Import("x1","x2")
assert x1 == "SConstruct x1"
A = Action("A")
""")
+
+test.write('SConscript6', """
+Import("x7 x8")
+assert x7 == "SConstruct x7"
+assert x8 == "SConstruct x8"
+x9 = "SConscript6 x9"
+Return("x9")
+""")
+
wpath = test.workpath()
test.run(stdout = "SConstruct %s\nSConscript %s\n" % (wpath, wpath))