- Function action fixes: None is now a successful return value.
Exceptions are now reported. Document function actions.
+ - Add 'Action' and 'Scanner' to the global keywords so SConscript
+ files can use them too.
+
RELEASE 0.03 - Fri, 11 Jan 2002 01:09:30 -0600
import SCons.Node
import SCons.Node.FS
import SCons.Environment
+import SCons.Scanner
import SCons.Action
import string
import sys
"""
globals = {}
- globals['Builder'] = SCons.Builder.Builder
- globals['Environment'] = SCons.Environment.Environment
- globals['Object'] = SCons.Defaults.Object
- globals['Program'] = SCons.Defaults.Program
- globals['Library'] = SCons.Defaults.Library
- globals['CScan'] = SCons.Defaults.CScan
- globals['SConscript'] = SConscript
- globals['Default'] = Default
- globals['Help'] = Help
- globals['BuildDir'] = BuildDir
- globals['GetBuildPath'] = GetBuildPath
- globals['Export'] = Export
- globals['Import'] = Import
- globals['Return'] = Return
- globals['Dir'] = SCons.Node.FS.default_fs.Dir
- globals['File'] = SCons.Node.FS.default_fs.File
+ globals['Action'] = SCons.Action.Action
+ globals['BuildDir'] = BuildDir
+ globals['Builder'] = SCons.Builder.Builder
+ globals['CScan'] = SCons.Defaults.CScan
+ globals['Default'] = Default
+ globals['Dir'] = SCons.Node.FS.default_fs.Dir
+ globals['Environment'] = SCons.Environment.Environment
+ globals['Export'] = Export
+ globals['File'] = SCons.Node.FS.default_fs.File
+ globals['GetBuildPath'] = GetBuildPath
+ globals['Help'] = Help
+ globals['Import'] = Import
+ globals['Library'] = SCons.Defaults.Library
+ globals['Object'] = SCons.Defaults.Object
+ globals['Program'] = SCons.Defaults.Program
+ globals['Return'] = Return
+ globals['Scanner'] = SCons.Scanner.Base
+ globals['SConscript'] = SConscript
globals['SetCommandHandler'] = SCons.Action.SetCommandHandler
return globals
script = File('SConscript', subdir)
foo = SConscript(script)
assert foo == "subdir/SConscript foo"
+
+SConscript('SConscript5')
""")
test.write('SConscript', """
Return('foo')
""")
+
+test.write('SConscript5', """
+B = Builder(name = 'B', action = 'B')
+def scan():
+ pass
+S = Scanner(name = 'S', function = scan)
+A = Action("A")
+""")
+
wpath = test.workpath()
test.run(stdout = "SConstruct %s\nSConscript %s\n" % (wpath, wpath))