Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-12-30 06:58:06

On Wednesday 29 December 2004 20:01, Steven Knight wrote:

> > But, you can't name subsidiary config file SConstruct, right? In other
> > words, can you write:
> >
> > SConscirpt("d/SConstruct")
> >
> > and have everything work?
> Sure, you could, but there are some caveats.
> When invoked from the d/ subdirectory, SCons would, of course, think
> that was the top of the tree. This would mean you couldn't rely on an
> environment (or other variable) passed from a higher-layer SConstruct
> file, so you'd have to write each SConstruct file to be self-contained
> (or use some common Python modules or something to share logic).
> You'd have to use TargetSignatures('content') everywhere. That will give
> you consistent signatures regardless of whether the file (like a library)
> is a source in one build (because you're only linking against it) and
> a target in another build (because you're building it *and* linking
> against it). By default, SCons uses a "build signature" for targets
> that consists of the signatures of all its consistuent source files,
> and the command/action used to build it, which is more efficient than
> re-scanning the target's contents.
> Last, you'd definitely want to use the current default behavior of a
> separate .sconsign file in each directory, no global database file for
> all of the build's signatures. I mention this because we may be changing
> the default behavior to use the global file, which is friendlier for
> most builds. An explicit SConsignFile(None) will specify the existing
> .sconsign-per-directory behavior regardless of whether we change the
> default.

Hmm.. quite a list of caveats.

> Note that I haven't tried such a configuration (SConstruct in each
> directory) myself, though, so there may be other snags, but I'd be glad
> to help figure them out if you wanted to try to make a configuration
> like this work.

Actually, I've tried to figure out if using the same name over the tree is a
officially supported thing in SCons. Seems like no user wanted this, right?

- Volodya


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at