[Scons-users] Re-building files together
William Deegan
bill at baddogconsulting.com
Fri Jun 28 22:46:20 EDT 2013
Arvid,
On Jun 27, 2013, at 1:30 AM, Arvid Rosén <arvid at softube.com> wrote:
> Hi!
>
> I would like to add an option to use a special compiler, which collects statistics to a database, and I'm facing the following situation:
>
> * I have groups of filest which need to be built
> * The database needs to be initialized before the files are built
> * If one file in a the group needs to be rebuild, I need to reinitialize the database and rebuild all files in the group
>
> How can I achieve this?
>
> I think I can use Requires to force the database to be initialized, but I am not sure how to force all files to be rebuilt. I guess I could add dependencies between all source files in the group, but as there are many files spread out over different SConscript files, this seems cumbersome. I do have a list of all object nodes though, which is used for linking, so an operation on this list that will instruct SCons that these objects need to be rebuilt together would be great.
Try monkey-patching the emitter for the builders you're using.
That might be an ugly but functional way to do it.
-Bill
More information about the Scons-users
mailing list