[Scons-users] Scons deleting output files it does not know about

Pico Geyer picogeyer at gmail.com
Wed Oct 2 08:40:53 EDT 2013


Hi all.

I'm trying to use scons for a certain project where we have a version of
boost in our source tree.
I've created a simple builder that builds boost into our variant dir (by
wrapping the standard boost install commands)
The targets that the boost builder knows about are just a few library files
and symlinks which we expect to be in the output dir.
So I end up with directory containing both boost includes and libs
variant_dir/boost/build/include
variant_dir/boost/build/lib


The problem is that in C files where I actually use boost (eg #include
<boost/thread.hpp>), scons is detecting thread.hpp as an implicit
dependency and then deleting it from my build_dir !
After some digging, I found the --debug=duplicate option that actually
shows this happening:
dup: no src for <path_to>/variant_dir/boost/build/include/boost/thread.hpp,
unlinking old variant copy
After this my builds fail because the required header file has now vanished.
If I understand correctly one ugly solution would be add every header file
that the boost build creates to my boost builder so that scons knows that
the include file was an output of my boost builder.

So my question is:
1) Why is scons deleting that file when it doesn't know how to recreate it?

2) Is there a recommended way to protect the files in the output dir from
being removed by scons?

Regards,
Pico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20131002/d6d4254f/attachment-0001.html


More information about the Scons-users mailing list