SCons may use files from one or more shared code repositories in order to build local copies of changed target files. A repository would typically be a central directory tree, maintained by an integrator, with known good libraries and executables.
Repository('/home/source/1.1', '/home/source/1.0')
Specified repositories will be searched in-order for any file
(configuration file, input file, target file) that does not exist
in the local directory tree. When building a local target file,
SCons will rewrite path names in the build command to use the
necessary repository files. This includes modifying lists of
-I
or -L
flags to specify an
appropriate set of include paths for dependency analysis.
SCons will modify the Python sys.path
variable to
reflect the addition of repositories to the search path, so that any
imported modules or packages necessary for the build can be found in a
repository, as well.
If an up-to-date target file is found in a code repository, the file will not be rebuilt or copied locally. Files that must exist locally (for example, to run tests) may be specified:
Local('program', 'libfoo.a')
in which case SCons will copy or link an up-to-date copy of the file from the appropriate repository.