[Scons-users] Dependency scanning of generated source code files
Tom Tanner (BLOOMBERG/ LONDON)
ttanner2 at bloomberg.net
Tue Apr 16 09:47:38 EDT 2013
Ah, it's OK, I've discovered what I was doing wrong.
----- Original Message -----
From: ttanner2 at bloomberg.net
To: scons-users at scons.org
At: Apr 16 2013 08:11:37
Yes, there's separate env.Command() for each file.
Interestingly I don't get this problem if I build everything from scratch. It appears to be doing a rebuild that causes the issue and causes the dependency information to be lost.
----- Original Message -----
From: scons-users at scons.org
To: scons-users at scons.org
At: Apr 15 2013 21:45:34
Tom,
Does your builder which generates the source code list all the files which are generated as targets?
-Bill
On Mon, Apr 15, 2013 at 4:35 AM, Tom Tanner (BLOOMBERG/ LONDON) <ttanner2 at bloomberg.net> wrote:
I've been somewhat confused as to why my builds break randomly, and I think I've found the problem.
Part of the build generates both source code and header files, then builds an object from the result. Which I would have thought wouldn't be an issue. However, it appears to destroy the dependencies for the .o target somehow, as if I change something use to generate the source and header files, and build with --debug=explain I get something like this:
--- builds thing.cc because another_file has been changed
--- builds thing.hh because another_file has been changed
--- builds thing1.hh because another_file has been changed
scons: rebuilding 'so_thing.o' because:
'thing.hh' is no londer a dependancy
'thing1.hh' is no longer a dependancy
....
and so on for every #include in thing.cc
And if you also dump the tree output, you see that the .o is indeed not dependant on those .hh files.
the next time you do this process, you get
scons: rebuilding so_thing.o because thing.cc changed
even though multiple header files have changed.
All this occasionally results (especially if you are building in parallel) in so_thing.o being built /before/ one or other of the requisite header files have been built.
So, how do I get the source code file to be rescanned after it is regenerated? and/or why is the scan producing an empty list?
_______________________________________________
Scons-users mailing list
Scons-users at scons.org
http://four.pairlist.net/mailman/listinfo/scons-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20130416/6fe40998/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20650719913002.txt
Type: application/octet-stream
Size: 149 bytes
Desc: not available
Url : <http://four.pairlist.net/pipermail/scons-users/attachments/20130416/6fe40998/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 9633722071695002.txt
Type: application/octet-stream
Size: 149 bytes
Desc: not available
Url : <http://four.pairlist.net/pipermail/scons-users/attachments/20130416/6fe40998/attachment-0003.obj>
More information about the Scons-users
mailing list