scons: A less magic way of not building progs by default.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 15 Feb 2010 20:48:24 +0000 (20:48 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 15 Feb 2010 20:48:24 +0000 (20:48 +0000)
The problem with the old way is that passing 'progs/subdir' as argument
would fail.

SConstruct

index 964af7e59188b3c854c55ba1c570029102e636fe..ea63b90f46fb19ce57c632948e1d7eeb1e243ee9 100644 (file)
@@ -225,9 +225,10 @@ SConscript(
        duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
 )
 
-if 'progs' in COMMAND_LINE_TARGETS:
-    SConscript(
-        'progs/SConscript',
-        variant_dir = os.path.join('progs', env['build']),
-        duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
-    )
+env.Default('src')
+
+SConscript(
+    'progs/SConscript',
+    variant_dir = os.path.join('progs', env['build']),
+    duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
+)