I don't think it is possible in the current Waf implementation (waflib.Context.Context.recurse
uses a global WSCRIPT_FILE
variable).
Though ugly, it is possible to hack this at the beginning of your main wscript
:
import waflib.Context
original_recurse = waflib.Context.Context.recurse
def new_recurse(ctx,*args, **kwargs):
original_wscript_file = waflib.Context.WSCRIPT_FILE
try:
waflib.Context.WSCRIPT_FILE = (original_wscript_file +
kwargs.pop('suffix', ''))
original_recurse(ctx, *args, **kwargs)
finally:
waflib.Context.WSCRIPT_FILE = original_wscript_file
waflib.Context.Context.recurse = new_recurse
Your main wscript
would the be something like:
def configure(cfg):
cfg.recurse(suffix='_boost')
cfg.recurse(suffix='_gtest')
Note that there are some side effects, as WSCRIPT_FILE
is suffixed when you are inside the wscript_boost
file.
You can also submit an issue to the waf project.