111c111
< build_roots = []
---
> build_root = None
119,121c119,126
< build_root = os.path.join('/',*path_dirs[:build_top+1])
< if build_root not in build_roots:
< build_roots.append(build_root)
---
> this_build_root = os.path.join('/',*path_dirs[:build_top+1])
> if not build_root:
> build_root = this_build_root
> else:
> if this_build_root != build_root:
> print "Error: build targets not under same build root\n"\
> " %s\n %s" % (build_root, this_build_root)
> Exit(1)
160,161c165,169
< # Platform-specific configuration
< conf = Configure(env)
---
> # Platform-specific configuration. Note again that we assume that all
> # builds under a given build root run on the same host platform.
> conf = Configure(env,
> conf_dir = os.path.join(build_root, '.scons_config'),
> log_file = os.path.join(build_root, 'scons_config.log'))
300a309,313
> # libelf build is shared across all configs in the build root.
> env.SConscript('ext/libelf/SConscript',
> build_dir = os.path.join(build_root, 'libelf'),
> exports = 'env')
>
310,320d322
< # Spme things (just libelf currently) are shared across all configs in
< # a "build root". Need to define how to build these just once for
< # each referenced root.
< build_root_env = {}
< for build_root in build_roots:
< env = base_env.Copy()
< env.SConscript('ext/libelf/SConscript',
< build_dir = os.path.join(build_root, 'libelf'),
< exports = 'env')
< build_root_env[build_root] = env
<
327c329
< env = build_root_env[build_root].Copy()
---
> env = base_env.Copy()