X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Examples%2FSConscript;fp=Examples%2FSConscript;h=60c1337d18bb181e4f5bf5a1ff530c4d7510fb68;hb=e7184facd970e81cf2c0de5e9688bb7b6b70a305;hp=c5e6c01ad27add5fcf7dfbda01ce2118f75a1881;hpb=ee1b1f40446551f70a087ab63bbd3f83cf1a02b6;p=senf.git diff --git a/Examples/SConscript b/Examples/SConscript index c5e6c01..60c1337 100644 --- a/Examples/SConscript +++ b/Examples/SConscript @@ -1,37 +1,24 @@ # -*- python -*- Import('env') -import SENFSCons, glob, yaptu +import SENFSCons, glob ########################################################################### -EXAMPLES = [] -for dox in sorted(glob.glob("*/Mainpage.dox")): - title = ([None] + [ line.split('\\mainpage',1)[-1].strip() for line in file(dox) - if '\\mainpage' in line ])[-1] - if title: - EXAMPLES.append( (dox.split('/',1)[0], title) ) +SENFSCons.IndexPage(env, 'Mainpage.dox', title="Examples") -MAINPAGE=""" -/** \mainpage Examples - - \htmlonly -
- -{{ for name, title in EXAMPLES: -
${name}
${title}
-}} - -
- \endhtmlonly - */ -""" - -file("Mainpage.dox","w").write(yaptu.process(MAINPAGE, globals(), env.Dictionary())) +SENFSCons.Doxygen(env) -SConscript(glob.glob("*/SConscript")) +for sconstruct in glob.glob("*/SConstruct"): + dir=env.File(sconstruct).dir + example=env.Command(dir.File('.example.phony'), env.Alias('default'), + [ '$SCONS -C $EXAMPLEDIR' ], + CONCURRENCY_LEVEL=1, EXAMPLEDIR=dir) + env.Alias('examples', example) -env.Clean('all','Mainpage.dox') -env.Clean('all_docs','Mainpage.dox') -SENFSCons.Doxygen(env) +for dox in glob.glob("*/Doxyfile"): + extra_sources = [ eval(line.split(':',1)[1]) + for line in file(dox) + if line.startswith("# extra_source: ") ] + SENFSCons.Doxygen(env, doxyfile=dox, extra_sources=extra_sources)