From da531b4aefc712fe4d735f386a7bc45fca8dd206 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Tue, 12 Jun 2007 19:04:38 +0100 Subject: [PATCH] WAF: process --run and --shell command-line options sooner, before running the build, since we may need a shell before the build finishes, in case the program to debug is part of the build itself. --- wscript | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/wscript b/wscript index 7e12cd170..75bca783c 100644 --- a/wscript +++ b/wscript @@ -93,6 +93,14 @@ def build(bld): variant_name = bld.env_of_name('default')['NS3_ACTIVE_VARIANT'] variant_env = bld.env_of_name(variant_name) bld.m_allenvs['default'] = variant_env # switch to the active variant + + if Params.g_options.run: + run_program(Params.g_options.run) + return + elif Params.g_options.shell: + run_shell() + return + # process subfolders from here bld.add_subdirs('src') bld.add_subdirs('samples utils examples') @@ -116,12 +124,6 @@ def shutdown(): if Params.g_options.doxygen: doxygen() - if Params.g_options.run: - run_program(Params.g_options.run) - - elif Params.g_options.shell: - run_shell() - def _find_program(program_name): for obj in Object.g_allobjs: if obj.target == program_name: