274a275
> main['BUILDROOT'] = build_root
308a310
> global_nonsticky_vars = Variables(args=ARGUMENTS)
319a322,327
> global_nonsticky_vars.AddVariables(
> ('VERBOSE', 'Print full tool command lines', False),
> ('update_ref', 'Update test reference outputs', False)
> )
>
>
328a337
> global_nonsticky_vars.Update(main)
330a340
> help_text += global_nonsticky_vars.GenerateHelpText(main)
348a359,392
> def _STRIP(path, env):
> path = str(path)
> variant_base = env['BUILDROOT'] + os.path.sep
> if path.startswith(variant_base):
> path = path[len(variant_base):]
> elif path.startswith('build/'):
> path = path[6:]
> return path
>
> def _STRIP_SOURCE(target, source, env, for_signature):
> return _STRIP(source[0], env)
> main['STRIP_SOURCE'] = _STRIP_SOURCE
>
> def _STRIP_TARGET(target, source, env, for_signature):
> return _STRIP(target[0], env)
> main['STRIP_TARGET'] = _STRIP_TARGET
>
> if main['VERBOSE']:
> def MakeAction(action, string, *args, **kwargs):
> return Action(action, *args, **kwargs)
> else:
> MakeAction = Action
> main['CCCOMSTR'] = ' [ CC] $STRIP_SOURCE'
> main['CXXCOMSTR'] = ' [ CXX] $STRIP_SOURCE'
> main['ASCOMSTR'] = ' [ AS] $STRIP_SOURCE'
> main['SWIGCOMSTR'] = ' [ SWIG] $STRIP_SOURCE'
> main['ARCOMSTR'] = ' [ AR] $STRIP_TARGET'
> main['LINKCOMSTR'] = ' [ LINK] $STRIP_TARGET'
> main['RANLIBCOMSTR'] = ' [ RANLIB] $STRIP_TARGET'
> main['M4COMSTR'] = ' [ M4] $STRIP_TARGET'
> main['SHCCCOMSTR'] = ' [ SHCC] $STRIP_TARGET'
> main['SHCXXCOMSTR'] = ' [ SHCXX] $STRIP_TARGET'
> Export('MakeAction')
>
669,672d712
< # Non-sticky variables only apply to the current build.
< nonsticky_vars = Variables(args=ARGUMENTS)
< Export('nonsticky_vars')
<
709,712d748
< nonsticky_vars.AddVariables(
< BoolVariable('update_ref', 'Update test reference outputs', False)
< )
<
790,793d825
< # String to print when generating header
< def gen_switch_hdr_string(target, source, env):
< return "Generating switch header " + str(target[0])
<
797,798c829,830
< switch_hdr_action = Action(gen_switch_hdr, gen_switch_hdr_string,
< varlist=['ALL_ISA_LIST'])
---
> switch_hdr_action = MakeAction(gen_switch_hdr,
> " [GENERATE] $STRIP_TARGET", varlist=['ALL_ISA_LIST'])
855d886
< nonsticky_vars.Update(env)
858,860c889
< + sticky_vars.GenerateHelpText(env) \
< + "\nNon-sticky variables for %s:\n" % variant_dir \
< + nonsticky_vars.GenerateHelpText(env)
---
> + sticky_vars.GenerateHelpText(env)