[Scons-users] Recursive directories, and the ignoring of filenames.

Bill Deegan bill at baddogconsulting.com
Fri Aug 3 15:41:09 EDT 2018


On Fri, Aug 3, 2018 at 11:40 AM, Alistair Buxton <a.j.buxton at gmail.com>
wrote:

> On 3 August 2018 at 19:26, Bill Deegan <bill at baddogconsulting.com> wrote:
> >
> >
> > On Fri, Aug 3, 2018 at 11:25 AM, Alistair Buxton <a.j.buxton at gmail.com>
> > wrote:
> >>
> >> On 3 August 2018 at 19:20, Bill Deegan <bill at baddogconsulting.com>
> wrote:
> >>
> >> >
> >> > Here's what you said in your initial email
> >> > "All files under /some/path will be inserted into the image.
> Therefore,
> >> > if any file or subdirectory is renamed, the image needs to be
> rebuilt,"
> >> >
> >> > So in the case above, rebuilding is correct?
> >>
> >> Yes, it is the correct behaviour, but it happens for the wrong reason.
> >> It happens as a result of the action string changing, NOT because the
> >> sources changed, and as I wrote:
> >
> >
> > Why is this the wrong reason?
>
> Because the purpose of the example was to demonstrate that scons does
> not reliably rebuild when the sources list changes. The fact that it
> rebuilds if the action string changes is completely irrelevant, and
> not helpful in the case where the tool takes a single directory as the
> only argument.
>

So if this causes the appropriate behavior but for the wrong "reason", then
you will not use it?


> >> On 3 August 2018 at 00:53, Alistair Buxton <a.j.buxton at gmail.com>
> wrote:
> >>
> >> > However, this is not so easy with the image builder case as it takes a
> >> > directory path as the only argument.
> >>
> >> In other words, the action string will not change when you have a tool
> >> which takes a single directory path as the only argument, and as a
> >> result, the build will not be re-run.
> >
> >
> > This is typically where a scanner would come into play.
>
> Since a scanner returns a list of dependencies, and the problem is due
> to the way scons internally processes dependency lists, this will not
> solve the problem, and will in fact have identical behaviour, unless
> you write the scanner to return a Value containing a recursive
> checksum similar to the one I presented in the first email - which btw
> is the only reliable recursive dependency code presented so far in
> this thread, assuming I typed it out correctly :)
>


As I understand it, you're trying to solve two issues to get the build you
want:
1) Find the list of all dependencies correctly.  The scanner can resolve
this.  (Especially if some of the files are built files, which you've yet
to answer from a previous response in this email thread)
2) Decide if you need to rebuild (For this to work you need a correct list
of dependencies, once again the scanner can solve this part of the
puzzle).  Then you just need an appropriate decider.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20180803/656183e1/attachment-0001.html>


More information about the Scons-users mailing list