Fix relative pathname handling in Doxyfiles
[senf.git] / SConstruct
1 # -*- python -*-
2
3 import sys, glob, os.path, datetime
4 sys.path.append('senfscons')
5 import SENFSCons
6
7 ###########################################################################
8
9 svninfo = dict(
10     [ tuple(map(lambda y:y.strip(),x.split(":",1)))
11       for x in os.popen("svn info").read().split("\n")
12       if ':' in x ] )
13 svninfo['commited'] = not(os.popen("svn status").read())
14
15 SENFSCons.UseBoost()
16 SENFSCons.UseSTLPort()
17 env = SENFSCons.MakeEnvironment()
18
19 env.Append(
20    CPPPATH = [ '#' ],
21    LIBS = [ 'iberty' ],
22    DOXY_XREF_TYPES = [ 'bug', 'fixme', 'todo', 'idea' ],
23    DOXY_HTML_XSL = '#/doclib/html-munge.xsl',
24    ENV = { 'TODAY' : str(datetime.date.today()),
25            'REVISION' : svninfo['Revision'] + (not(svninfo['commited']) and " + local changes" or ""),
26            },
27 )
28
29 Export('env')
30
31 SConscript(glob.glob("*/SConscript"))
32
33 SENFSCons.StandardTargets(env)
34 SENFSCons.GlobalTargets(env)
35 SENFSCons.Doxygen(env)
36 SENFSCons.DoxyXRef(env, 
37                    HTML_HEADER = '#/doclib/doxy-header-overview.html',
38                    HTML_FOOTER = '#/doclib/doxy-footer.html')
39
40 if not env.GetOption('clean') and not os.path.exists("Doxyfile.local"):
41     Execute(Touch("Doxyfile.local"))