Right now I have a project structure similar to this one:
project1/SConstruct (creates library1 and executable1)
files
project2/SConstruct (creates library2 and executable2)
files
project3/SConstruct (creates executable3 without libraries
creates executable4 with library1 and library2)
files
I can build all projects with SCons without problems, but I'd like to add a dependency from projects 1 and 2 into project 3. When running scons
in project 3, if projects 1 or 2 are not up-to-date, I'd like them to be built.
This is similar to SCons: directory dependency in a parallel build with the difference that I have several SConstruct files, one for each project.
I'd also like to pass command-line options to the dependencies projects, i.e., when running scons debug=1
in project 3, projects 1 and 2 are rebuilt with debug=1
.
Is there a way to achieve this or should I change my directory/build structure?