[Scons-users] Finding targets which depend on a source file

Abhishek Rai abhishekrai at gmail.com
Wed Nov 18 17:53:20 EST 2015


Hello,

Is there any way in scons to list all targets which depend on a given
source file?

In the code base that I'm working on, we have a "pre-commit" script which
verifies whether the changes in the commit break any targets.  Currently,
this script tries to build all targets.  Of course, some targets may not
need rebuilding if the corresponding source files haven't changed since the
previous build.  But given the dynamic nature of the code base, each run of
the pre-commit script ends up building nearly all targets even if that
commit affects only a small number of them.

Having the ability to list all targets derived from a given source file
will give us the ability to list out these targets first, and then only
build those targets as part of the pre-commit workflow.

Thanks!
Abhishek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20151118/906ef987/attachment.html>


More information about the Scons-users mailing list