env['BOOST_VARIANT'] = "-" + env['BOOST_TOOLSET'] + runtime
env['BOOSTTESTLIB'] = 'libboost_unit_test_framework' + env['BOOST_VARIANT']
+ env['BOOSTREGEXLIB'] = 'libboost_regex' + env['BOOST_VARIANT']
env.Append(LIBPATH = [ '$BOOST_LIBDIR' ],
CPPPATH = [ '$BOOST_INCLUDES' ])
if type(sources) == type(()):
testSources = sources[1]
sources = sources[0]
+ if type(sources) is not type([]):
+ sources = [ sources ]
objects = None
if sources:
- objects = env.Object(sources)
+ objects = env.Object([
+ source
+ for source in sources
+ if not str(source).endswith('.o') ]) + [
+ source
+ for source in sources
+ if str(source).endswith('.o') ]
+
if testSources:
test = env.BoostUnitTests(
target = 'test',
- source = sources,
- test_source = testSources,
+ objects = objects,
+ test_sources = testSources,
LIBS = LIBS,
OBJECTS = OBJECTS,
DEPENDS = [ env.File(LibPath(x)) for x in LIBS ])
# generated) by the given XSLT stylesheet. Since the HTML
# generated by doxygen is broken, we first filter the code through
# HTML-\c tidy and filter out some error messages.
-# \li If xml output is generatedwe create files \c bug.xmli and \c
+# \li If xml output is generated we create files \c bug.xmli and \c
# todo.xmli which contain all bugs and todo items specified in the
# sources. The format of these files is much more suited to
# postprocessing and is a more database like format as the doxygen
SCons.Action.Action(("for html in %s/*.html; do " +
" echo $$html;" +
" sed -e 's/id=\"current\"/class=\"current\"/' $${html}" +
- " | tidy -ascii -q --show-warnings no --fix-uri no" +
+ " | tidy -ascii -q --show-warnings no --fix-uri no " +
" | xsltproc --nonet --html --stringparam topdir %s -o $${html}.new %s - 2>&1" +
" | grep '^-'" +
" | grep -v 'ID .* already defined';" +
"done")
% (htmlnode.dir.abspath, reltopdir, xslfile.abspath)))
for doc in docs:
- env.Depends(doc,xslfile)
+ env.Depends(doc, xslfile)
if xmlnode:
xrefs = []
" --stringparam module $MODULE" +
" --stringparam type $TYPE" +
" ${SOURCES[1]} $SOURCE || touch $TARGET" ],
- MODULE = xmlnode.dir.dir.dir.name,
+ MODULE = xmlnode.dir.dir.dir.abspath[
+ len(env.Dir('#').abspath)+1:],
TYPE = type)
env.SideEffect(xref, xmlnode)
env.AddPreAction(docs, "rm -f %s" % (xref,))
xrefs.extend(xref_pp)
docs.extend(xrefs)
- env.Depends(docs,extra_sources)
+ env.Depends(docs, extra_sources)
for doc in docs :
env.Alias('all_docs', doc)
env.Clean('all_docs', doc)
docs = env.Alias('all_docs')[0].sources
xrefs = [ doc for doc in docs if os.path.splitext(doc.name)[1] == ".xmli" ]
xref = env.Command("doc/html/xref.xml", xrefs,
- [ "echo -e '<?xml version=\"1.0\"?>\\n<xref>' >$TARGET",
+ [ "echo '<?xml version=\"1.0\"?>' > $TARGET",
+ "echo '<xref>' >> $TARGET",
"cat $SOURCES >> $TARGET",
"echo '</xref>' >>$TARGET" ])