Buildsystem updates
[senf.git] / Examples / SConscript
1 # -*- python -*-
2
3 Import('env')
4 import SENFSCons, glob
5
6 ###########################################################################
7
8 SENFSCons.IndexPage(env, 'Mainpage.dox', title="Examples")
9
10 SENFSCons.Doxygen(env)
11
12 for sconstruct in glob.glob("*/SConstruct"):
13     dir=env.File(sconstruct).dir
14     example=env.Command(dir.File('.example.phony'), env.Alias('default'),
15                         [ '$SCONS -C $EXAMPLEDIR' ],
16                         CONCURRENCY_LEVEL=1, EXAMPLEDIR=dir)
17     env.Alias('examples', example)
18
19
20 for dox in glob.glob("*/Doxyfile"):
21     extra_sources = [ eval(line.split(':',1)[1])
22                       for line in file(dox) 
23                       if line.startswith("# extra_source: ") ]
24     SENFSCons.Doxygen(env, doxyfile=dox, extra_sources=extra_sources)