Add a --no-task-lines WAF option; together with -v it makes WAF just print executed commands, like 'make' does.
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Thu Apr 03 14:15:17 2008 +0100 (22 months ago)
changeset 28661d829915f092
parent 2865 d40eb18a4da0
child 2868 1102aaae54b8
Add a --no-task-lines WAF option; together with -v it makes WAF just print executed commands, like 'make' does.
wscript
     1.1 --- a/wscript	Wed Apr 02 21:33:31 2008 -0700
     1.2 +++ b/wscript	Thu Apr 03 14:15:17 2008 +0100
     1.3 @@ -59,6 +59,13 @@
     1.4                     action="store_true", default=False,
     1.5                     dest='enable_gcov')
     1.6  
     1.7 +    opt.add_option('--no-task-lines',
     1.8 +                   help=("Don't print task lines, i.e. messages saying which tasks are being executed by WAF."
     1.9 +                         "  Coupled with a single -v will cause WAF to output only the executed commands,"
    1.10 +                         " just like 'make' does by default."),
    1.11 +                   action="store_true", default=False,
    1.12 +                   dest='no_task_lines')
    1.13 +
    1.14      opt.add_option('--lcov-report',
    1.15                     help=('Generate a code coverage report '
    1.16                           '(use this option at build time, not in configure)'),
    1.17 @@ -167,10 +174,14 @@
    1.18  
    1.19  
    1.20  def build(bld):
    1.21 +    if Params.g_options.no_task_lines:
    1.22 +        import Runner
    1.23 +        def null_printout(s):
    1.24 +            pass
    1.25 +        Runner.printout = null_printout
    1.26 +
    1.27      Params.g_cwd_launch = Params.g_build.m_curdirnode.abspath()
    1.28 -        
    1.29      bld.create_ns3_program = types.MethodType(create_ns3_program, bld)
    1.30 -
    1.31      variant_name = bld.env_of_name('default')['NS3_ACTIVE_VARIANT']
    1.32      variant_env = bld.env_of_name(variant_name)
    1.33      bld.m_allenvs['default'] = variant_env # switch to the active variant