I am moving Code::Blocks projects to SCons. I have a source tree with the following structure:
trunk
lib1
lib2
libn
app1
app2
appn
This is my first time with Scons and I am trying to figure out what would be better – to have many small SConscripts in each app and lib folder or one big SContruct under the trunk with sections describing sources, switches and pre/post build commands for each project.
I personally prefer dealing with one file but I’d like to hear the opinion of the people experienced with SCons.
Thanks.
One advantage of individual
SConscriptfiles is that filenames within each one are relative to the directory in which theSConscriptfile resides. So creating a list of filenames for a build target becomes less verbose.On the other hand, targets that need to be shared among different
SConscriptfiles sometimes end up needing a lot ofExport()-ing andImport()-ing of symbols to communicate with each other.It looks like your apps and libraries are pretty well separated. In your case, I would start with creating multiple
SConscriptfiles in each major directory. It’s generally easier to combine them later, than to separate them later.