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.
--- a/wscript Tue Jun 12 18:52:58 2007 +0100
+++ b/wscript Tue Jun 12 19:04:38 2007 +0100
@@ -93,6 +93,14 @@
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 @@
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: