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

Bill Deegan bill at baddogconsulting.com
Fri Aug 3 17:05:50 EDT 2018


On Fri, Aug 3, 2018 at 12:51 PM, Alistair Buxton <a.j.buxton at gmail.com>
wrote:

> On 3 August 2018 at 20:41, Bill Deegan <bill at baddogconsulting.com> wrote:
>
> >> 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?
>
> I cannot use it because the tool in question only accepts a single
> directory as the sole argument, and so I could not list all the files
> in the action string even if I wanted to. (Which I do not.)
>

You can use it by added a env.Depends() from the target of whatever that
command is to your packaging command.
So while it won't appear on the command line of your command it will cause
your command to run.


>
> >
> > 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.
>
>
> No, this is incorrect on both counts.
>
> 1) I don't need the list of dependencies, because the tool I am
> running only accepts a single directory as the sole argument. The list
> of dependencies is therefore useless for the purposes of generating
> the action string.
>

You are incorrect.  You need SCons to know about the full list of
dependencies for it to know if the tool needs to be rerun.


>
> 2) Having a correct list of dependencies does not help in deciding if
> I need to rebuild, because scons will not check if the filenames have
> changed. It will therefore give the wrong result when given a correct
> list of dependencies. This is the issue I am reporting, and is the
> reason why none of the suggestions made so far in this thread will
> work, except for the Value() based workaround I initially presented.
>


Let's list some facts.

A. You are just starting to use the tool
B. Everyone who is responding to you has been using the tool quite a long
time
C. You immediately dismiss their advice time and time again because it
doesn't agree with your limited knowledge of how the tool works.

You are again making assumptions about the method SCons uses to decide if a
command should be rerun based on your experience with the behavior of the
default decider.

So shall we start over.
1. You need SCons to know about the dependencies which SHOULD cause your
tool to be rerun
2. You need a method for SCons to take that information and trigger a rerun
of your tool if any of the file contents or filenames change

True?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20180803/67837b9c/attachment.html>


More information about the Scons-users mailing list