small documentation fixes
[senf.git] / Examples / SConscript
1 import sys, glob, os.path, datetime
2 sys.path.append('senfscons')
3 Import('env')
4 import SENFSCons
5
6 ###########################################################################
7
8 import yaptu
9
10 HOWTOS = []
11 for dox in sorted(glob.glob("*/Mainpage.dox")):
12     title = ([None] + [ line.split('\\mainpage',1)[-1].strip() for line in file(dox)
13                         if '\\mainpage' in line ])[-1]
14     if title:
15         HOWTOS.append( (dox.split('/',1)[0], title) )
16
17 MAINPAGE="""
18 /** \mainpage Examples
19
20     \htmlonly
21     <dl>
22
23 {{  for name, title in HOWTOS:
24       <dt><a href="../../${name}/doc/html/index.html">${name}</a></dt><dd>${title}</a></dd>
25 }}
26
27     </dl>
28     \endhtmlonly
29  */
30 """
31
32 file("Mainpage.dox","w").write(yaptu.process(MAINPAGE, globals(), env.Dictionary()))
33
34 SConscript(glob.glob("*/SConscript"))
35
36 env.Clean('all','Mainpage.dox')
37 env.Clean('all_docs','Mainpage.dox')
38
39 SENFSCons.Doxygen(env)