waf: ardupilotwaf: reset LAST_IDX on every build

That is a workaround so that one can use `waf bin tests`, for example.  In our
context, the only restriction to the task generators creation is values defined
during configuration. Thus, ideally, the recursion and task generators creation
should be done only once for multiple build calls. We should do that in the
future.
This commit is contained in:
Gustavo Jose de Sousa 2016-02-03 13:00:35 +00:00 committed by Lucas De Marchi
parent f13e71a80c
commit 05f4c8b5b1

View File

@ -317,5 +317,10 @@ def options(opt):
) )
def build(bld): def build(bld):
global LAST_IDX
# FIXME: This is done to prevent same task generators being created with
# different idx when build() is called multiple times (e.g. waf bin tests).
# Ideally, task generators should be created just once.
LAST_IDX = 0
bld.add_pre_fun(_process_build_command) bld.add_pre_fun(_process_build_command)
bld.add_pre_fun(_select_programs_from_group) bld.add_pre_fun(_select_programs_from_group)