scons: Build the progs into seperate dirs as well.
authorJosé Fonseca <jfonseca@vmware.com>
Sat, 24 Jan 2009 15:56:28 +0000 (15:56 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Sat, 24 Jan 2009 15:56:28 +0000 (15:56 +0000)
SConstruct
progs/SConstruct
scons/generic.py

index baa0f9069b3523a5e2b71bd54ffb7b8d2714a38e..88cdffa5048f747a970bdc3fd6ae394eae41bcb0 100644 (file)
@@ -162,6 +162,6 @@ Export('env')
 
 SConscript(
        'src/SConscript',
-       build_dir = env['build'],
+       variant_dir = env['build'],
        duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
 )
index bce48f72ff12d412281e057b5b94493c8a12a699..4d268cc6d7bc0c34ef1f9a5f5287689bfb292028 100644 (file)
@@ -60,5 +60,6 @@ Export('env')
 
 SConscript(
     'SConscript',
+    build_dir = env['build'],
     duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
 )
index 7ded9207909a2a2eaab8ba95680b9a2cf1d2344c..df7ef42402ee8ec7a73ce20088f41f411f8c032d 100644 (file)
@@ -251,7 +251,7 @@ def generate(env):
     # Put build output in a separate dir, which depends on the current
     # configuration. See also http://www.scons.org/wiki/AdvancedBuildExample
     try:
-        env['variant_dir'] = ARGUMENTS['variant_dir']
+        env['build'] = ARGUMENTS['build']
     except KeyError:
         build_topdir = 'build'
         build_subdir = env['platform']
@@ -261,11 +261,10 @@ def generate(env):
             build_subdir += "-debug"
         if env['profile']:
             build_subdir += "-profile"
-        env['variant_dir'] = os.path.join(build_topdir, build_subdir)
+        env['build'] = os.path.join(build_topdir, build_subdir)
     # Place the .sconsign file in the build dir too, to avoid issues with
     # different scons versions building the same source file
-    #env.VariantDir(env['variant_dir']
-    #env.SConsignFile(os.path.join(env['variant_dir'], '.sconsign'))
+    env.SConsignFile(os.path.join(env['build'], '.sconsign'))
 
     # Summary
     print
@@ -274,7 +273,7 @@ def generate(env):
     print '  toolchain=%s' % env['toolchain']
     print '  debug=%s' % ['no', 'yes'][env['debug']]
     print '  profile=%s' % ['no', 'yes'][env['profile']]
-    #print '  variant_dir=%s' % env['variant_dir']
+    print '  build=%s' % env['build']
     print
 
     # Load tool chain