summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-12-16 13:36:51 +0000
committerJosé Fonseca <jfonseca@vmware.com>2009-12-16 13:41:18 +0000
commit587166dbbb5c18d312842a922d1fb01819f0a8b7 (patch)
treeac7676f3c5535ae6e7649c9b91387fd5f5157946
parenta213819dbb76ac882fe127f96509442a233079d4 (diff)
Ensure SCons persistent data is put in the build dir and not shared across variants.
-rw-r--r--src/SConstruct26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/SConstruct b/src/SConstruct
index 2411612..0eee3b2 100644
--- a/src/SConstruct
+++ b/src/SConstruct
@@ -182,6 +182,19 @@ if env['platform'] == 'darwin':
'OpenGL',
])
+variant = env['platform']
+if env['machine'] != 'generic':
+ variant += '-' + env['machine']
+if env['debug']:
+ variant += '-debug'
+env['variant'] = variant
+
+# Put all SCons' persistent data in the build dir
+build_dir = os.path.join('..', 'build', variant)
+env.SConsignFile(os.path.join(build_dir, 'sign'))
+env['CONFIGUREDIR'] = os.path.join(build_dir, 'conf')
+env['CONFIGURELOG'] = os.path.join(build_dir, 'config.log')
+
conf = Configure(env)
if not conf.CheckCHeader('GL/glext.h'):
conf.env.Prepend(CPPPATH = ['#glext'])
@@ -214,18 +227,9 @@ env.Prepend(CPPPATH = [
'#libs/timer',
])
-variant = env['platform']
-if env['machine'] != 'generic':
- variant += '-' + env['machine']
-if env['debug']:
- variant += '-debug'
-env['variant'] = variant
-
-variant_dir = os.path.join('..', 'build', variant)
-
-env.VariantDir(variant_dir, '.', duplicate=0)
+env.VariantDir(build_dir, '.', duplicate=0)
-SConscript('SConscript', variant_dir=variant_dir, duplicate=0)
+SConscript('SConscript', build_dir=build_dir, duplicate=0)
env.Tool('packaging')
env.Package(