[Scons-users] SCons Progress feature

William Blevins wblevins001 at gmail.com
Fri Jul 15 12:24:47 EDT 2016


Ivan,

You may just be able to call is_up_to_date on the File node:
http://scons.org/doc/HTML/scons-api/SCons.Node.FS.File-class.html#is_up_to_date
.

V/R,
William

On Fri, Jul 15, 2016 at 12:12 PM, Ivan Kravets <me at ikravets.com> wrote:

> Hi all,
>
> Could someone give me a few hints how to resolve the next task? I want to
> use Progress(callable) in pair with "—silent" option. The idea is to show
> only the files that are affected by builders.
>
> Progress('$TARGET\r') - does it in right way. However, it prints ALL nodes
> not matter were they changed or not.
>
> From the docs:
> ```
> def my_progress_function(node, *args, **kw):
>     print 'Evaluating node %s!' % node
> Progress(my_progress_function, interval=10)
> ```
>
> 1. How can we determine which node "will be built/re-built"? Modified?
> 2. How to filter only source code targets (*.c, *.cpp, .S). Yes, we can
> use `node.path.endswith((".c", ".cpp")) and etc. Do we have something
> better in SCons.Node.FS.File? I've tried a few methods from API of this
> class but didn't find instruments to determine "$TARGET".
>
> ===
>
> Currently, we own callback it prints "every node" (source code, objects,
> headers, toolchains, etc).
>
> Evaluating some.h
> Evaluating other.h
> Evaluating /toolchain/g++
> Evaluating some.o
> Evaluating hello.a
> Evaluating another.cpp
>
> ——
>
> Would be good to show only affected TARGETS and the only that should be
> built.
>
>
> Thanks in advance!
>
> - Ivan
> _______________________________________________
> 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/20160715/cbaa13c8/attachment.html>


More information about the Scons-users mailing list