X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Examples%2FSConscript;h=7350f38268d1efecc40ea74cead3e2657ca47cec;hb=6c0332484574ed1cb571bbc0dc9f0a37d6653282;hp=cdb256a7ccc8dcf48888f5b1641fc4f0a5bfc6c2;hpb=9a988902090d28007578e93bffd809f6bd913155;p=senf.git diff --git a/Examples/SConscript b/Examples/SConscript index cdb256a..7350f38 100644 --- a/Examples/SConscript +++ b/Examples/SConscript @@ -1,10 +1,26 @@ -import sys, glob, os.path, datetime -sys.path.append('senfscons') +# -*- python -*- + Import('env') -import SENFSCons +import SENFSCons, glob ########################################################################### -SConscript(glob.glob("*/SConscript")) +SENFSCons.IndexPage(env, 'Mainpage.dox', title="Examples") + +SENFSCons.Doxygen(env) + +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) + if env.GetOption('clean') and 'all' in BUILD_TARGETS or 'examples' in BUILD_TARGETS: + env.Clone(CONCURRENCY_LEVEL=1, EXAMPLEDIR=dir).Execute([ '$SCONS -C $EXAMPLEDIR -c' ]) + -SENFSCons.Doxygen(env) \ No newline at end of file +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)