X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=SConstruct;h=3d952f49644ffe04bb2be37a0358a0eb9ecc99fe;hb=9a988902090d28007578e93bffd809f6bd913155;hp=cb087e72100abecede9dd5604090ab599fe88e5d;hpb=30373fc1f6c6b615850bd56d345779e9f5eb4d48;p=senf.git diff --git a/SConstruct b/SConstruct index cb087e7..3d952f4 100644 --- a/SConstruct +++ b/SConstruct @@ -1,28 +1,49 @@ # -*- python -*- -import sys, glob, os.path +import sys, glob, os.path, datetime sys.path.append('senfscons') -import SatSCons +import SENFSCons ########################################################################### -SatSCons.UseBoost() -SatSCons.UseSTLPort() -env = SatSCons.MakeEnvironment() +# Load subversion information +svninfo = dict( + [ map(lambda y:y.strip(),x.split(":",1)) + for x in os.popen("svn info").read().split("\n") + if ':' in x ] ) +svninfo['commited'] = not(os.popen("svn status -q").read()) +# Load utilities and setup libraries +SENFSCons.UseBoost() +SENFSCons.UseSTLPort() +env = SENFSCons.MakeEnvironment() + +# Configure build env.Append( CPPPATH = [ '#' ], LIBS = [ 'iberty' ], - DOXYFILES = [ '#/doclib/doxy-header.html', '#/doclib/doxy-footer.html', - '#/doclib/Doxyfile.global' ] + DOXY_XREF_TYPES = [ 'bug', 'fixme', 'todo', 'idea' ], + DOXY_HTML_XSL = '#/doclib/html-munge.xsl', + ENV = { 'TODAY' : str(datetime.date.today()), + 'REVISION' : svninfo['Revision'] + (not(svninfo['commited']) and " + local changes" or ""), + }, ) Export('env') +# Build modules (that is, instruct to build ... the build happens later) SConscript(glob.glob("*/SConscript")) -SatSCons.StandardTargets(env) -SatSCons.GlobalTargets(env) -SatSCons.Doxygen(env) - -if not os.path.exists("Doxyfile.local") : Execute(Touch("Doxyfile.local")) +SENFSCons.StandardTargets(env) +SENFSCons.GlobalTargets(env) +SENFSCons.Doxygen(env, extra_sources = [ + 'Examples/Sniffer/Sniffer.cc', +]) +SENFSCons.DoxyXRef(env, + HTML_HEADER = '#/doclib/doxy-header-overview.html', + HTML_FOOTER = '#/doclib/doxy-footer.html') + +# Create Doxyfile.local if not cleaning and the file does not exist +# otherwise doxygen will barf on this non-existent file +if not env.GetOption('clean') and not os.path.exists("Doxyfile.local"): + Execute(Touch("Doxyfile.local"))