[Scons-users] dep defintions

Hans-Christian Wild hchr.wild at gmail.com
Fri Jun 12 16:23:20 EDT 2020


Hi, in parallel to all general constructive critique about your approach,
the provided code sample should work, given that you tell scons where the
following can be picked from:

'$T/consts/asm-code/consts.asm'

SCons tells you that it is not there and that it does not know how to
produce it. Given that I assume that the problem does not reside within the
code snippet that you have provided...

Looking a bit deeper, I would be curious to learn what your compiler is and
why you can't resolve your "symlink" problem by carefully placing include
directives.

On Fri, Jun 12, 2020 at 8:42 PM daggs <daggs at gmx.com> wrote:

> include consts.asm
>
> I'd figured it would be better than have a placeholder in the from of
> %%PATH%%/consts.asm and then use cat code.asm | sed 's/%%PATH%%/g' >
> output/debug/build/asm-code/code.asm
>
>
> *Sent:* Friday, June 12, 2020 at 9:34 PM
> *From:* "Bill Deegan" <bill at baddogconsulting.com>
> *To:* "SCons users mailing list" <scons-users at scons.org>
> *Subject:* Re: [Scons-users] dep defintions
> You really need to create a scanner then..
> That'd be the best way to go about this.
>
> What's the include statement look like?
>
> -Bill
>
> On Fri, Jun 12, 2020 at 11:11 AM daggs <daggs at gmx.com> wrote:
>
>> Greetings Bill.
>>
>> I think my original explenation was too implicit, I'll elaborate,
>> code.asm includes consts.asm, this means that if code.asm or consts.asm
>> doesn't exists in $O/asm-code at the time code.bin is generated, the
>> StaticObject call will fail.
>>
>> that is why I've tried to use depends as I didn't know how to make sure
>> that the link will exist prior to code.bin's generation.
>> that is what I'm trying to do (unsuccessfully)
>>
>> T is defined at that point, no need to worry about it,
>>
>> *Sent:* Friday, June 12, 2020 at 6:57 PM
>> *From:* "Bill Deegan" <bill at baddogconsulting.com>
>> *To:* "SCons users mailing list" <scons-users at scons.org>
>> *Subject:* Re: [Scons-users] dep defintions
>> 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
>>
>> _______________________________________________ Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
> _______________________________________________ Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> _______________________________________________
> 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/b812babd/attachment-0001.html>


More information about the Scons-users mailing list