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.

This commit is contained in:
Gustavo J. A. M. Carneiro
2007-06-12 19:04:38 +01:00
parent 4772e79fee
commit da531b4aef

14
wscript
View File

@@ -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: