2

Here's a wscript:

def build(bld):
    bld.recurse('somefolder')

def test(ctx):
    ctx(features='test ...', ..., use=['lib'])

from waflib.Build import BuildContext
class TestCtx(BuildContext):
    cmd = 'test'
    fun = 'test'

lib is a target created by some recursion into somefolder (perhaps in a subfolder). I want to use that in the test command. Can I do this without modifying the wscript(s) in somefolder/**? If so, how?

Alternatively, is there any way to make conditional the execution path of the build function to emulate the desired behavior (i.e. calling waf build and waf test would behave as desired)?

Notes

I've tried using ctx.recurse('somefolder',name='build') in test, but the recursion from somefolder on doesn't penetrate subfolders of somefolder, and all recurse calls from within somefolder recurse as test.

user69453
  • 1,279
  • 1
  • 17
  • 43
user
  • 4,920
  • 3
  • 25
  • 38

0 Answers0