tags:

views:

10

answers:

1

I have some complex aliases ex.

Alias('build', [ Program(), Install()...])
Alias('test', [Program(), Install(), RunTest()]
Alias('dist', [Install()])

and finally

Alias('all', [ Alias('build'), Alias('test'), Alias('dist')])

Question:
How to depend Alias('dist') on Alias('test') in Alias('all') ? I've tried Depends() variations but it seems I've done something wrong.

cheers P.

UPDATE:

I've managed that by myself.

build = Alias('build', [ Program(), Install()...])
test = Alias('test', [Program(), Install(), RunTest()]
dist = Alias('dist', [Install()])

Depends(test, build)
Depends(dist, test)

Default('dist')
A: 

I tend to make named targets for everything (with the dependencies) and then Alias the targets that I want to publish to whoever is running SCons.

prog = env.Program(..., libs)
install = env.Install(..., prog)
test = env.RunTest(..., libs)

Alias('build', prog)
Alias('test', test)
Alias('dist', [ test, install, bump_version ])

I don't know that there's a reason to prefer one method over the other. To me, it seems more natural to set up the dependencies internally, then use Alias to publish the targets that need to be user runnable.

Dave Bacher