X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senfscons%2FSENFSCons.py;h=c2819199483c9e91a9835cdd014be81c047bbe15;hb=81ffa1c459b96dd44472bcef37e1e373934ee138;hp=a4a3620cc1ed7a77fb1742542600fb0e045184c6;hpb=2c4c9deecc7491fbfc916aeb41074dcb76e8a2c2;p=senf.git diff --git a/senfscons/SENFSCons.py b/senfscons/SENFSCons.py index a4a3620..c281919 100644 --- a/senfscons/SENFSCons.py +++ b/senfscons/SENFSCons.py @@ -49,6 +49,7 @@ import SCons.Defaults, SCons.Action SCONS_TOOLS = [ "Doxygen", "Dia2Png", + "CopyToDir", ] opts = None @@ -138,6 +139,7 @@ def FinalizeBoost(env): 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' ]) @@ -244,9 +246,13 @@ def MakeEnvironment(): # in the current directory. The sources will be returned as a tuple of # sources, test-sources. The target helpers all accept such a tuple as # their source argument. -def GlobSources(exclude=[]): +def GlobSources(exclude=[], subdirs=[]): testSources = glob.glob("*.test.cc") sources = [ x for x in glob.glob("*.cc") if x not in testSources and x not in exclude ] + for subdir in subdirs: + testSources += glob.glob(os.path.join(subdir,"*.test.cc")) + sources += [ x for x in glob.glob(os.path.join(subdir,"*.cc")) + if x not in testSources and x not in exclude ] return (sources, testSources) ## \brief Add generic standard targets for every module @@ -426,7 +432,19 @@ def Doxygen(env, doxyfile = "Doxyfile", extra_sources = []): xrefs.extend(xref_pp) docs.extend(xrefs) - env.Depends(docs, extra_sources) + if extra_sources and htmlnode: + env.Depends(docs, + [ env.CopyToDir( source=source, target=htmlnode.dir ) + for source in extra_sources ]) + + if extra_sources and xmlnode: + env.Depends(docs, + [ env.CopyToDir( source=source, target=xmlnode.dir ) + for source in extra_sources ]) + + if not htmlnode and not xmlnode: + env.Depends(docs, extra_sources) + for doc in docs : env.Alias('all_docs', doc) env.Clean('all_docs', doc)