[Scons-users] Dependency scanning of generated source code files

Bill Deegan bill at baddogconsulting.com
Mon Apr 15 16:45:26 EDT 2013


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/20130415/8f30a4cc/attachment.htm>


More information about the Scons-users mailing list