[Scons-users] dep defintions

Bill Deegan bill at baddogconsulting.com
Fri Jun 12 11:57:33 EDT 2020


 asm_work_dir = '$O/asm-code'
asm_src_link = env.Command('$O/asm-code/code.asm', '#/asm-code/code.asm',
symlink)
asm_const_link = env.Command('$O/asm-code/consts.asm',
'$T/consts/asm-code/consts.asm', symlink)

# Why do this at all? The command above should do this
x=env.Depends(asm_const_link, '$T/consts/asm-code/consts.asm')

# not sure what you're trying to accomplish here?  would y = asm_const_link?
env.Depends(asm_src_link, y)

# is T defined by this point? if so
# My mantra is if you have to use Depends() a good chance either you don't
understand something or your doing something wrong (or both).

env.StaticObject('$T/code.bin', asm_src_link)

Remove the depends. see if it does the right thing and check the
--tree=prune


On Fri, Jun 12, 2020 at 6:27 AM daggs <daggs at gmx.com> wrote:

> Greetings,
>
> I'm trying to create a static object based on links but for some reason
> one of the links fails to get created, here is the code:
>
> asm_work_dir = env['O'] + '/asm-code'
> asm_src_link = env.Command(asm_work_dir + '/code.asm',
> '#/asm-code/code.asm', symlink)
> asm_const_link = env.Command(asm_work_dir + '/consts.asm', env['T'] +
> '/consts/asm-code/consts.asm', symlink)
> env.Depends(asm_src_link, env.Depends(asm_const_link, env['T'] +
> '/consts/asm-code/consts.asm'))
>
> env.StaticObject(env['T'] + '/code.bin', asm_src_link)
>
> when I run it, I get this error:
> scons: *** [output/debug/build/asm-code/consts.asm] Source
> `output/debug/target/consts/asm-code/consts.asm' not found, needed by
> target `output/debug/build/asm-code/consts.asm'.
>
> adding --tree=prune produces this tree:
> |   | +-output/debug/build/asm-code
> |   | | +-output/debug/build/asm-code/code.asm
> |   | | | +-asm-code/code.asm
> |   | | | +-output/debug/build/asm-code/consts.asm
> |   | | |   +-output/debug/target/consts/asm-code/consts.asm
> |   | | |   +-output/debug/target/consts/.defs_generated
> |   | | +-[output/debug/build/asm-code/consts.asm]
>
> what I want to do is to create both links and then run te static object.
>
> what am I doing wrong?
>
> Thanks.
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20200612/59c78c0f/attachment.html>


More information about the Scons-users mailing list