- Change the .sconsign format and the checks for whether a Node is
up-to-date to make dependency checks more efficient and correct.
+ - Add wrapper Actions to SCons.Defaults for $ASCOM, $ASPPCOM, $LINKCOM,
+ $SHLINKCOM, $ARCOM, $LEXCOM and $YACCCOM. This makes it possible
+ to replace the default print behavior with a custom strfunction()
+ for each of these.
+
From Gary Oberbrunner:
- Add a --debug=presub option to print actions prior to substitution.
ASAction = SCons.Action.Action("$ASCOM")
ASPPAction = SCons.Action.Action("$ASPPCOM")
+LinkAction = SCons.Action.Action("$LINKCOM")
+ShLinkAction = SCons.Action.Action("$SHLINKCOM")
+
+ArAction = SCons.Action.Action("$ARCOM")
+
+LexAction = SCons.Action.Action("$LEXCOM")
+YaccAction = SCons.Action.Action("$YACCCOM")
+
ProgScan = SCons.Scanner.Prog.ProgScan()
def DVI():
try:
program = env['BUILDERS']['Program']
except KeyError:
- program = SCons.Builder.Builder(action = '$LINKCOM',
+ program = SCons.Builder.Builder(action = SCons.Defaults.LinkAction,
emitter = '$PROGEMITTER',
prefix = '$PROGPREFIX',
suffix = '$PROGSUFFIX',
try:
static_lib = env['BUILDERS']['StaticLibrary']
except KeyError:
- static_lib = SCons.Builder.Builder(action = "$ARCOM",
+ static_lib = SCons.Builder.Builder(action = SCons.Defaults.ArAction,
emitter = '$LIBEMITTER',
prefix = '$LIBPREFIX',
suffix = '$LIBSUFFIX',
try:
shared_lib = env['BUILDERS']['SharedLibrary']
except KeyError:
- action_list = [ SCons.Defaults.SharedCheck, "$SHLINKCOM" ]
+ action_list = [ SCons.Defaults.SharedCheck,
+ SCons.Defaults.ShLinkAction ]
shared_lib = SCons.Builder.Builder(action = action_list,
emitter = "$SHLIBEMITTER",
prefix = '$SHLIBPREFIX',
"""Add Builders and construction variables for lex to an Environment."""
c_file, cxx_file = SCons.Tool.createCFileBuilders(env)
- c_file.add_action('.l', '$LEXCOM')
- cxx_file.add_action('.ll', '$LEXCOM')
+ c_file.add_action('.l', SCons.Defaults.LexAction)
+ cxx_file.add_action('.ll', SCons.Defaults.LexAction)
env['LEX'] = env.Detect('flex') or 'lex'
env['LEXFLAGS'] = SCons.Util.CLVar('')
import os.path
+import SCons.Defaults
import SCons.Tool
import SCons.Util
"""Add Builders and construction variables for yacc to an Environment."""
c_file, cxx_file = SCons.Tool.createCFileBuilders(env)
- c_file.add_action('.y', '$YACCCOM')
- cxx_file.add_action('.yy', '$YACCCOM')
+ c_file.add_action('.y', SCons.Defaults.YaccAction)
+ cxx_file.add_action('.yy', SCons.Defaults.YaccAction)
c_file.add_emitter('.y', yEmitter)
cxx_file.add_emitter('.yy', yyEmitter)