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