From: g0dil Date: Fri, 21 Aug 2009 21:13:48 +0000 (+0000) Subject: Fix documentation dependencies X-Git-Url: http://g0dil.de/git?p=senf.git;a=commitdiff_plain;h=58176d355b73d14490515294555df7ef795529bf Fix documentation dependencies Clean up install targets git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1326 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/SConstruct b/SConstruct index 1c4c1dc..b7484c1 100644 --- a/SConstruct +++ b/SConstruct @@ -58,11 +58,11 @@ env.Append( TEST_EXTRA_LIBS = [ ], PREFIX = '/usr/local', - LIBINSTALLDIR = '$PREFIX/lib', - BININSTALLDIR = '$PREFIX/bin', - INCLUDEINSTALLDIR = '$PREFIX/include', + LIBINSTALLDIR = '$PREFIX', + BININSTALLDIR = '$PREFIX', + INCLUDEINSTALLDIR = '$PREFIX', OBJINSTALLDIR = '$LIBINSTALLDIR', - DOCINSTALLDIR = '$PREFIX/doc', + DOCINSTALLDIR = '$PREFIX/docs', CPP_INCLUDE_EXTENSIONS = [ '.h', '.hh', '.ih', '.mpp', '.cci', '.ct', '.cti' ], CPP_EXCLUDE_EXTENSIONS = [ '.test.hh' ], @@ -118,13 +118,11 @@ if not env.GetOption('clean') and not os.path.exists(".prepare-stamp") \ # Load SConscripts SConscript("debian/SConscript") -SConscript("doclib/SConscript") if os.path.exists('SConscript.local') : SConscript('SConscript.local') - SConscript("senf/SConscript") - SConscript("Examples/SConscript") SConscript("HowTos/SConscript") +SConscript("doclib/SConscript") ########################################################################### # Define build targets @@ -170,6 +168,7 @@ if env.GetOption('clean'): for path, subdirs, files in os.walk('.') for pattern in env['CLEAN_PATTERNS'] for f in fnmatch.filter(files,pattern) ]) + env.Clean('all', '.') if not env.GetOption('clean') and not os.path.exists(".prepare-stamp"): Execute(Touch(".prepare-stamp")) diff --git a/doclib/SConscript b/doclib/SConscript index 85654a9..fc811cd 100644 --- a/doclib/SConscript +++ b/doclib/SConscript @@ -251,17 +251,20 @@ function paths() { } ?>""" -env.Append( ENV = { - 'TODAY' : str(datetime.date.today()), - 'TEXINPUTS' : os.environ.get('TEXINPUTS',env.Dir('#/doclib').abspath + ':'), - 'DOXYGEN' : env.get('DOXYGEN', 'doxygen'), -}) +env.SetDefault( + DOXYGEN = "doxygen" +) env.Replace( - ALL_TAGFILES = [], DOXYGENCOM = "doclib/doxygen.sh $DOXYOPTS $SOURCE", ) +env.Append( ENV = { + 'TODAY' : str(datetime.date.today()), + 'TEXINPUTS' : os.environ.get('TEXINPUTS',env.Dir('#/doclib').abspath + ':'), + 'DOXYGEN' : env.File(env['DOXYGEN']).abspath, +}) + env.PhonyTarget('linklint', [], [ 'rm -rf linklint', 'linklint -doc linklint -limit 99999999 `find -type d -name html -printf "/%P/@ "`', diff --git a/senf/SConscript b/senf/SConscript index 0eb33c6..c81d609 100644 --- a/senf/SConscript +++ b/senf/SConscript @@ -14,4 +14,4 @@ if not env.GetOption('clean') and not os.path.exists("local_config.hh"): SConscript(list(set(glob.glob("*/SConscript")) - set(("Ext/SConscript",)))) SConscript("Ext/SConscript") -env.InstallSubdir(target = '$INCLUDEINSTALLDIR', source = [ 'config.hh' ]) +env.InstallSubdir(target = '$INCLUDEINSTALLDIR', source = [ 'config.hh', 'local_config.hh' ]) diff --git a/site_scons/SENFSCons.py b/site_scons/SENFSCons.py index 87e0bbd..4857fe1 100644 --- a/site_scons/SENFSCons.py +++ b/site_scons/SENFSCons.py @@ -46,7 +46,7 @@ def Doxygen(env, doxyfile = "Doxyfile", extra_sources = []): 'html' : 'NO', 'generate_tagfile': 'doc/${MODULE}.tag' }, MODULE = module ) - env.Append(ALL_TAGFILES = tagfile[0].abspath) + env.Append(ALL_TAGFILES = [ tagfile[0].abspath ]) env.Depends(tagfile, [ env.File('#/doclib/doxygen.sh'), env.File('#/doclib/tag-munge.xsl') ]) @@ -71,8 +71,7 @@ def Doxygen(env, doxyfile = "Doxyfile", extra_sources = []): env.Depends(doc, env.CopyToDir(doc[0].dir, extra_sources)) # Install documentation into DOCINSTALLDIR - l = len(env.Dir('#').abspath) - env.Install(env.Dir('$DOCINSTALLDIR').Dir(doc[0].dir.get_path('#')), doc[0].dir) + env.Install(env.Dir('$DOCINSTALLDIR').Dir(doc[0].dir.dir.get_path(env.Dir('#'))), doc[0].dir) # Useful aliases env.Alias('all_docs', doc) @@ -95,7 +94,7 @@ def AllIncludesHH(env, exclude=[]): # The following functions serve as simple macros for most SConscript files # # If you need to customize these rules, copy-and-paste the code into the -# SConscript file and adjust at will (don't to forget to replace the +# SConscript file and adjust at will (don't forget to replace the # parameters with their actual value. Parameters are marked with ((name)) ) def AutoRules(env, exclude=[], subdirs=[], doc_extra_sources = []): @@ -118,7 +117,7 @@ def AutoPacketBundle(env, name, exclude=[], subdirs=[], doc_extra_sources=[]): subscripts = glob.glob("*/SConscript") objects = env.Object(sources) - cobject = env.CombinedObject(name, objects) + cobject = env.CombinedObject('${LOCALLIBDIR}/${NAME}', objects, NAME=((name))) env.Default(cobject) env.Append(ALLOBJECTS = objects, PACKET_BUNDLES = cobject)