+@INCLUDE = "$(TOPDIR)/doclib/Doxyfile.global"
+
PROJECT_NAME = Overview
PROJECT_NUMBER = "(Revision $(REVISION), generated $(TODAY))"
-OUTPUT_DIRECTORY = doc
-INPUT = .
-FILE_PATTERNS = *.dox
-IMAGE_PATH = .
EXAMPLE_PATH = Sniffer
-HTML_HEADER = doclib/doxy-header-overview.html
-HTML_FOOTER = doclib/doxy-footer.html
-GENERATE_LATEX = NO
-GENERATE_MAN = NO
-@INCLUDE = "Doxyfile.local"
+HTML_HEADER = doclib/doxy-header-overview.html
+GENERATE_XML = NO
\li Doxygen (http://www.doxygen.org)
\li The \c dia diagram editor (http://www.gnome.org/projects/dia/)
+ \li \The c xsltproc XSLT processor (http://xmlsoft.org/XSLT/xsltproc2.html)
The library is only tested with gcc-3.4 and 4.0 on Linux. On other
\section new_conf Configuring SENFSCons
To set up the build environment, copy the
- <tt>senfscons/SConstruct.template</tt> to <tt>Satscons</tt> in the
- project root. The default setup of this file is to build all
+ <tt>senfscons/SConstruct.template</tt> to <tt>SConstruct</tt> in
+ the project root. The default setup of this file is to build all
subdirectories (using the \c SConscript files of the
subdirectories). You can add additonal global targets and
configuration parameters here.
-@INCLUDE = ../doclib/Doxyfile.global
+@INCLUDE = "$(TOPDIR)/doclib/Doxyfile.global"
PROJECT_NAME = libPackets
-TAGFILES = ../Utils/doc/Utils.tag
+TAGFILES = "$(TOPDIR)/Utils/doc/Utils.tag"
GENERATE_TAGFILE = doc/Packets.tag
\ No newline at end of file
# -*- python -*-
-import sys, glob, os.path
+import sys, glob, os.path, datetime
sys.path.append('senfscons')
import SENFSCons
###########################################################################
+svninfo = dict(
+ [ tuple(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").read())
+
SENFSCons.UseBoost()
SENFSCons.UseSTLPort()
env = SENFSCons.MakeEnvironment()
LIBS = [ 'iberty' ],
DOXY_XREF_TYPES = [ 'bug', 'fixme', 'todo', 'idea' ],
DOXY_HTML_XSL = '#/doclib/html-munge.xsl',
-)
-
-import datetime
-
-svninfo = dict(
- [ tuple(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").read())
-
-env.Append(
- ENV = { 'TODAY' : datetime.date.today(),
- 'REVISION' : svninfo['Revision'] + (not(svninfo['commited']) and " + local changes" or "") }
+ ENV = { 'TODAY' : str(datetime.date.today()),
+ 'REVISION' : svninfo['Revision'] + (not(svninfo['commited']) and " + local changes" or ""),
+ },
)
Export('env')
-@INCLUDE = ../doclib/Doxyfile.global
+@INCLUDE = "$(TOPDIR)/doclib/Doxyfile.global"
PROJECT_NAME = libScheduler
-TAGFILES = ../Utils/doc/Utils.tag
+TAGFILES = "$(TOPDIR)/Utils/doc/Utils.tag"
GENERATE_TAGFILE = doc/Scheduler.tag
-@INCLUDE = ../doclib/Doxyfile.global
+@INCLUDE = "$(TOPDIR)/doclib/Doxyfile.global"
PROJECT_NAME = libSocket
-TAGFILES = ../Utils/doc/Utils.tag
+TAGFILES = "$(TOPDIR)/Utils/doc/Utils.tag"
GENERATE_TAGFILE = doc/Socket.tag
-@INCLUDE = ../doclib/Doxyfile.global
+@INCLUDE = "$(TOPDIR)/doclib/Doxyfile.global"
PROJECT_NAME = libUtils
GENERATE_TAGFILE = doc/Utils.tag
OUTPUT_DIRECTORY = doc
INPUT = .
FILE_PATTERNS = *.c *.cc *.cci *.ct *.cti *.h *.hh *.ih *.mmc *.dox
-EXCLUDE_PATTERNS = *.test.cc *.test.hh .*
+EXCLUDE_PATTERNS = *.test.cc *.test.hh .* *~ "#*#"
IMAGE_PATH = .
ALIASES = "fixme=\xrefitem fixme \"Fix\" \"Fixmes\"" \
PREDEFINED = DOXYGEN
EXPAND_AS_DEFINED = prefix_
-HTML_HEADER = ../doclib/doxy-header.html
-HTML_FOOTER = ../doclib/doxy-footer.html
+HTML_HEADER = "$(TOPDIR)/doclib/doxy-header.html"
+HTML_FOOTER = "$(TOPDIR)/doclib/doxy-footer.html"
GENERATE_LATEX = NO
GENERATE_MAN = NO
GENERATE_XML = YES
MAX_DOT_GRAPH_DEPTH = 3
DOT_MULTI_TARGETS = YES
-@INCLUDE = "../Doxyfile.local"
+@INCLUDE = "$(TOPDIR)/Doxyfile.local"
-@INCLUDE = ../doclib/Doxyfile.global
+@INCLUDE = "$(TOPDIR)/doclib/Doxyfile.global"
PROJECT_NAME = SENFSCons
-PROJECT_NUMBER = "Version 0.0.1"
import os, sys, traceback
import os.path
-import glob
+import glob, re
from fnmatch import fnmatch
-def DoxyfileParse(file):
- data = DoxyfileParse_(file,{})
- for (k,v) in data.items():
+EnvVar = re.compile(r"\$\(([0-9A-Za-z_-]+)\)")
+
+def DoxyfileParse(env,file):
+ ENV = {}
+ ENV.update(env.get("ENV",{}))
+ ENV['TOPDIR'] = env.Dir('#').abspath
+ data = DoxyfileParse_(file,{},ENV)
+ for k,v in data.items():
if not v : del data[k]
elif k in ("INPUT", "FILE_PATTERNS", "EXCLUDE_PATTERNS", "@INCLUDE", "TAGFILES") : continue
elif len(v)==1 : data[k] = v[0]
return data
-def DoxyfileParse_(file, data):
+def DoxyfileParse_(file, data, ENV):
"""
Parse a Doxygen source file and return a dictionary of all the values.
Values will be strings and lists of strings.
import shlex
lex = shlex.shlex(instream=open(file), posix=True)
- lex.wordchars += "*+./-:@~"
+ lex.wordchars += "*+./-:@~$()"
lex.whitespace = lex.whitespace.replace("\n", "")
lex.escape = "\\"
elif token == "=":
data[key] = []
else:
+ token = EnvVar.sub(lambda m,ENV=ENV: str(ENV.get(m.group(1),"")),token)
append_data(data, key, new_data, token)
new_data = True
if key=='@INCLUDE':
inc = os.path.join(dir,data['@INCLUDE'][-1])
if os.path.exists(inc) :
- DoxyfileParse_(inc,data)
+ DoxyfileParse_(inc,data,ENV)
last_token = token
token = lex.get_token()
sources = []
basedir = node.dir.abspath
- data = DoxyfileParse(node.abspath)
+ data = DoxyfileParse(env, node.abspath)
recursive = data.get("RECURSIVE", "NO").upper()=="YES"
file_patterns = data.get("FILE_PATTERNS", default_file_patterns)
exclude_patterns = data.get("EXCLUDE_PATTERNS", default_exclude_patterns)
"XML" : ("NO", "xml"),
}
- data = DoxyfileParse(source[0].abspath)
+ data = DoxyfileParse(env, source[0].abspath)
targets = []
if data.has_key("OUTPUT_DIRECTORY"):
return (targets, source)
-def doxyNodeHtmlDir(node):
+def doxyNodeHtmlDir(env,node):
if not node.sources : return None
- data = DoxyfileParse(node.sources[0].abspath)
+ data = DoxyfileParse(env, node.sources[0].abspath)
if data.get("GENERATE_HTML",'YES').upper() != 'YES' : return None
return os.path.normpath(os.path.join( node.sources[0].dir.abspath,
data.get("OUTPUT_DIRECTORY","."),
def DoxyGenerator(source, target, env, for_signature):
- data = DoxyfileParse(source[0].abspath)
+ data = DoxyfileParse(env, source[0].abspath)
- actions = [ env.Action("cd ${SOURCE.dir} && ${DOXYGEN} ${SOURCE.file}") ]
+ actions = [ env.Action("cd ${SOURCE.dir} && TOPDIR=%s ${DOXYGEN} ${SOURCE.file}"
+ % (relpath(source[0].dir.abspath, env.Dir('#').abspath),)) ]
# This will add automatic 'installdox' calls.
#
url = env.get(os.path.splitext(os.path.basename(tagfile))[0].upper()+"_DOXY_URL", None)
if not url:
url = doxyNodeHtmlDir(
+ env,
env.File(os.path.normpath(os.path.join(str(source[0].dir), tagfile))))
if url : url = relpath(output_dir, url)
if not url: