From: g0dil Date: Fri, 21 Aug 2009 14:10:25 +0000 (+0000) Subject: Extension support X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=dabe8f95330ac77629aabcb710627af474b440de;hp=81bca7eaa075738ba2f2b7c36efaced331677836;p=senf.git Extension support git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1319 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/.gitignore b/senf/.gitignore index d215d6d..e75ff76 100644 --- a/senf/.gitignore +++ b/senf/.gitignore @@ -1,2 +1 @@ -/Ext/*/ /local_config.hh diff --git a/senf/Ext/.gitignore b/senf/Ext/.gitignore new file mode 100644 index 0000000..7feaa12 --- /dev/null +++ b/senf/Ext/.gitignore @@ -0,0 +1,2 @@ +Mainpage.dox +/*/ diff --git a/senf/Ext/Doxyfile b/senf/Ext/Doxyfile new file mode 100644 index 0000000..d34a117 --- /dev/null +++ b/senf/Ext/Doxyfile @@ -0,0 +1,3 @@ +@INCLUDE = "$(TOPDIR)/doclib/Doxyfile.global" + +PROJECT_NAME = Extensions diff --git a/senf/Ext/SConscript b/senf/Ext/SConscript new file mode 100644 index 0000000..90dcbc4 --- /dev/null +++ b/senf/Ext/SConscript @@ -0,0 +1,46 @@ +# -*- python -*- + +Import('env') +import SENFSCons, glob, os.path, yaptu + +########################################################################### + +sconscripts = sorted(glob.glob("*/SConscript")) + +EXTENSIONS = [] +for script in sconscripts: + name = os.path.split(script)[0] + dox = os.path.join(name, 'Mainpage.dox') + title = '' + if os.path.exists(dox): + title = ([''] + [ line.split('\\mainpage',1)[-1].strip() for line in file(dox) + if '\\mainpage' in line ])[-1] + EXTENSIONS.append((name, title)) + + +MAINPAGE=""" +/** \mainpage Extensions + + This folder contains additional SENF extensions which are built + into the senf libarary but are not part of senf proper. + + \htmlonly +
+ +{{ for name, title in EXTENSIONS: +
${name}
${title}
+}} + +
+ \endhtmlonly + */ +""" + +file("Mainpage.dox","w").write(yaptu.process(MAINPAGE, globals(), env.Dictionary())) + +SConscript(sconscripts) + +env.Clean('all','Mainpage.dox') +env.Clean('all_docs','Mainpage.dox') + +SENFSCons.Doxygen(env) diff --git a/senf/SConscript b/senf/SConscript index 62838d1..0eb33c6 100644 --- a/senf/SConscript +++ b/senf/SConscript @@ -9,6 +9,9 @@ import SENFSCons, glob, os if not env.GetOption('clean') and not os.path.exists("local_config.hh"): Execute(Touch("local_config.hh")) -SConscript(glob.glob("*/SConscript")) +# Ext/SConscript is last so it can depend on env vars set by any other script +# (e.g. $PACKET_BUNDLES) +SConscript(list(set(glob.glob("*/SConscript")) - set(("Ext/SConscript",)))) +SConscript("Ext/SConscript") env.InstallSubdir(target = '$INCLUDEINSTALLDIR', source = [ 'config.hh' ]) diff --git a/senf/Utils/Console.hh b/senf/Utils/Console.hh new file mode 100644 index 0000000..fecc57c --- /dev/null +++ b/senf/Utils/Console.hh @@ -0,0 +1,37 @@ +// $Id$ +// +// Copyright (C) 2007 +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Stefan Bund +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +/** \file + \brief Console public header */ + +#include + + +// Local Variables: +// mode: c++ +// fill-column: 100 +// comment-column: 40 +// c-file-style: "senf" +// indent-tabs-mode: nil +// ispell-local-dictionary: "american" +// compile-command: "scons -u test" +// End: diff --git a/site_scons/senfutil.py b/site_scons/senfutil.py index 4aae4da..01eae03 100644 --- a/site_scons/senfutil.py +++ b/site_scons/senfutil.py @@ -58,7 +58,7 @@ def SetupForSENF(env): if os.path.exists('senf'): print "\nUsing SENF in './senf'\n" env.Append( LIBPATH = [ 'senf' ], - CPPPATH = [ 'senf/include' ], + CPPPATH = [ 'senf' ], SENF_BUILDOPTS = [ '${final and "final=1" or None}', '${debug and "debug=1" or None}', '${profile and "profile=1" or None}' ],