Implement partial BUILDDIR support
[senf.git] / senf / SConscript
index 62838d1..e022ad3 100644 (file)
@@ -1,7 +1,7 @@
 # -*- python -*-
 
 Import('env')
-import SENFSCons, glob, os
+import SENFSCons, os
 
 ###########################################################################
 
@@ -9,6 +9,10 @@ import SENFSCons, glob, os
 if not env.GetOption('clean') and not os.path.exists("local_config.hh"):
     Execute(Touch("local_config.hh"))
 
-SConscript(glob.glob("*/SConscript"))
+# Ext/SConscript is last so it can depend on env vars set by any other script
+# (e.g. $PACKET_BUNDLES)
+SConscript(sorted(list(set(env.Glob("*/SConscript", strings=True)) - set(("Ext/SConscript",)))))
+SConscript("Ext/SConscript")
 
-env.InstallSubdir(target = '$INCLUDEINSTALLDIR', source = [ 'config.hh' ])
+env.InstallSubdir(target = '$INCLUDEINSTALLDIR', 
+                  source = sorted(env.Glob("*.hh", strings=True)))