Improve handling of SConfig and Doxyfile.local in debian build
[senf.git] / Packets / SConscript
index b39aa65..37de48e 100644 (file)
@@ -1,19 +1,30 @@
 # -*- python -*-
 
 Import('env')
-import SENFSCons
+import SENFSCons, glob
 
 ###########################################################################
 
-sources = SENFSCons.GlobSources()
+def makeAllIncludesHH(target, headers):
+    file(env.File(target).abspath,"w").write("".join([ '#include "%s"\n' % f
+                                                       for f in headers ]))
 
-SENFSCons.StandardTargets(env)
+###########################################################################
 
+source_headers = [ f for f in glob.glob("*.hh")
+                   if 'defined(SENF_PACKETS_DECL_ONLY)' in file(f).read() ]
+source_headers.sort()
+makeAllIncludesHH('all_includes.hh', source_headers)
+env.Clean('all','all_includes.hh')
+
+SENFSCons.StandardTargets(env)
 SENFSCons.Lib(env,
               library = 'Packets',
-              sources = sources,
+              sources = SENFSCons.GlobSources(),
               LIBS = [ 'Socket', 'Utils' ])
-
 SENFSCons.Doxygen(env, extra_sources = [
     env.Dia2Png("structure.dia")
 ])
+
+SConscript(glob.glob("*/SConscript"))
+