[Scons-users] dependencies on directories

Tom Tanner (BLOOMBERG/ LONDON) ttanner2 at bloomberg.net
Mon Dec 28 05:45:16 EST 2015


After I persuaded the guy in question to fix *his* dependencies, I discovered that the 'Install' builder appears to do something similar but different. It appears to generate a directory as a target. And the dependencies are strange indeed. Because the directory appears to depend on files that don't exist but *might*. 

For instance I get the following list of dependencies:

    bahblah/dirname:
          source/this.h
          source/this.hpp
          source/this.hh
          source/this.hxx

So I'm going to have (for now) to ignore target directories as well as source directories.

I am in the process of kicking my home version up to 2.41 (don't ask what the work version is on), but am I bit worried about it because it's resulting in a huge rebuild - --debug=explain is producing large lists of extra dependencies (mainly from Qt but also from m/s compiler) detected. I don't know if this is a good or a bad thing but it was a surprise.

Once I've done that I'll do a pull request.


From: bill at baddogconsulting.com At: Dec 11 2015 21:42:10
To: Tom Tanner (BLOOMBERG/ LONDON), scons-users at scons.org
Subject: Re: [Scons-users] dependencies on directories

Tom,

Yes, currently you shouldn't have dependencies on Directories.  
It won't behave the way you expect in that a change in a file would make the directory out of date.
It's implicit rather than explicit.

And honestly would benefit from some separation between directories, and what I think people generally mean which is all files (recursively, or not) in/under a directory.

-Bill

On Fri, Dec 11, 2015 at 3:56 AM, Tom Tanner (BLOOMBERG/ LONDON) <ttanner2 at bloomberg.net> wrote:

So when fiddling around with my 'error on file changed during build' I discovered someone had created some targets that were dependent on directories, which the check *really* did not like very much.

But I'm confused as to what a dependency on a directory actually means. It generally seems to mean 'exists' but get_timestamp returns the latest time in any file in that directory rather than the timestamp of the directory. And the .sconsign entry contains neither time or md5sum. I suppose this means you shouldn't really have dependencies on directories, they should be order only dependencies. Is that how they behave, or can you rebuild if the contents of a directory change?


Currently this also means I have  nasty 'isdir' check in my validation of file-not-changed which doesn't feel very nice
_______________________________________________
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/20151228/4bd55f6e/attachment.html>


More information about the Scons-users mailing list