[Scons-users] Customize build decision logic for phony targets, that doesn't involve files

Bill Deegan bill at baddogconsulting.com
Tue Mar 29 11:53:29 EDT 2016


Andrew,

Isn't the output for your actual case a file? (the filesystem layer?)

-Bill

On Tue, Mar 29, 2016 at 5:46 AM, William Blevins <wblevins001 at gmail.com>
wrote:

> Correction. With Value('target') as output, SCons will not build even with
> AlwaysBuild apparently. The point I am trying to make is that 'target' is
> expected to be a file by default. In theory, you can define your own Node.*
> type, but in your example, 'target' is expected to be a file.
>
> V/R,
> William
>
> On Tue, Mar 29, 2016 at 1:20 PM, William Blevins <wblevins001 at gmail.com>
> wrote:
>
>> Andrew,
>>
>> In this case, SCons will always rebuild because specified target 'target'
>> will never be created. If you, for example, change the target to
>> Value('target') SCons will never call the action because the target never
>> needs to be built without wrapping the env.Custom output in
>> env.AlwaysBuild(). The rebuild has nothing to do with the source Value('a')
>> since Value('a') obviously never changes. You can look at the contents of
>> the scons database file using "sconsign <database_file>" which defaults to
>> .scons.dblite I believe in the "#" directory.
>>
>> Does that answer your question?
>>
>> V/R,
>> William
>>
>> On Tue, Mar 29, 2016 at 11:00 AM, Andrew Pashkin <
>> andrew.pashkin at gmx.co.uk> wrote:
>>
>>> On 03/28/2016 07:59 PM, Bill Deegan wrote:
>>>
>>> Try:
>>> scons --debug=explain
>>>
>>> Here is what I get:
>>>
>>> scons: Reading SConscript files ...
>>> scons: done reading SConscript files.
>>> scons: Building targets ...
>>> scons: building `target' because it doesn't exist
>>> action(["target"], ['a'])
>>> Do crazy things
>>> scons: done building targets.
>>>
>>> What I want to know is not a concrete solution, but an answer on a
>>> question: conceptually, should SCons handle such case, as this script, or
>>> not? Meaning - is it a bug or it's a intended constraint for SCons to work
>>> only on files?
>>>
>>> _______________________________________________
>>> 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/20160329/b82690ee/attachment-0001.html>


More information about the Scons-users mailing list