From: g0dil Date: Thu, 20 Aug 2009 15:43:23 +0000 (+0000) Subject: Simplify ALlIncludesHH usage X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=8a3a987daec0028a9e41abd09c187948c8cb393c;p=senf.git Simplify ALlIncludesHH usage Fix python imports in SConscripts git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1313 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/PPI/SConscript b/PPI/SConscript index 50962cd..d74fc60 100644 --- a/PPI/SConscript +++ b/PPI/SConscript @@ -7,9 +7,7 @@ import SENFSCons, glob SConscript(glob.glob("*/SConscript")) -SENFSCons.AllIncludesHH(env, [ f for f in glob.glob("*.hh") - if f not in ('all_includes.hh','PPI.hh') \ - and not f.endswith('.test.hh') ]) +SENFSCons.AllIncludesHH(env, exclude = ['PPI.hh']) sources, tests, includes = SENFSCons.Glob(env, subdirs=[ 'detail' ]) diff --git a/SConstruct b/SConstruct index 7cf0362..a972bf4 100644 --- a/SConstruct +++ b/SConstruct @@ -1,6 +1,6 @@ # -*- python -*- -import sys, glob, os.path, datetime, pwd, time, fnmatch, string +import sys, glob, os.path, fnmatch sys.path.append(Dir('#/senfscons').abspath) sys.path.append(Dir('#/doclib').abspath) import SENFSCons, senfutil @@ -172,7 +172,7 @@ env.PhonyTarget('valgrind', [ 'all_tests' ], [ """ #### clean env.Clean('all', '.prepare-stamp') env.Clean('all', libsenf) -env.Clean('all', 'linklint') +env.Clean('all', env.Dir('linklint')) # env.Dir to disambiguate from linklint PhonyTarget if env.GetOption('clean'): env.Clean('all', [ os.path.join(path,f) diff --git a/Socket/Protocols/DVB/SConscript b/Socket/Protocols/DVB/SConscript index e1c3df4..abbb591 100644 --- a/Socket/Protocols/DVB/SConscript +++ b/Socket/Protocols/DVB/SConscript @@ -7,8 +7,7 @@ import SENFSCons, glob SConscript(glob.glob("*/SConscript")) -SENFSCons.AllIncludesHH(env, [ f for f in glob.glob("*.hh") - if f not in ('all_includes.hh','DVB.hh') and not f.endswith('.test.hh') ]) +SENFSCons.AllIncludesHH(env, exclude=['DVB.hh']) sources, tests, includes = SENFSCons.Glob(env) diff --git a/Socket/Protocols/INet/SConscript b/Socket/Protocols/INet/SConscript index 9de80d5..4ef2133 100644 --- a/Socket/Protocols/INet/SConscript +++ b/Socket/Protocols/INet/SConscript @@ -7,8 +7,7 @@ import SENFSCons, glob SConscript(glob.glob("*/SConscript")) -SENFSCons.AllIncludesHH(env, [ f for f in glob.glob("*.hh") - if f not in ('all_includes.hh','INet.hh') and not f.endswith('.test.hh') ]) +SENFSCons.AllIncludesHH(env, exclude=['INet.hh']) sources, tests, includes = SENFSCons.Glob(env) diff --git a/Socket/Protocols/Raw/SConscript b/Socket/Protocols/Raw/SConscript index 5f6b223..a75c754 100644 --- a/Socket/Protocols/Raw/SConscript +++ b/Socket/Protocols/Raw/SConscript @@ -7,8 +7,7 @@ import SENFSCons, glob SConscript(glob.glob("*/SConscript")) -SENFSCons.AllIncludesHH(env, [ f for f in glob.glob("*.hh") - if f not in ('all_includes.hh','Raw.hh') and not f.endswith('.test.hh') ]) +SENFSCons.AllIncludesHH(env, exclude=['Raw.hh']) sources, tests, includes = SENFSCons.Glob(env) diff --git a/Socket/Protocols/UN/SConscript b/Socket/Protocols/UN/SConscript index 6366cfd..33e12ac 100644 --- a/Socket/Protocols/UN/SConscript +++ b/Socket/Protocols/UN/SConscript @@ -7,8 +7,7 @@ import SENFSCons, glob SConscript(glob.glob("*/SConscript")) -SENFSCons.AllIncludesHH(env, [ f for f in glob.glob("*.hh") - if f not in ('all_includes.hh','UN.hh') and not f.endswith('.test.hh') ]) +SENFSCons.AllIncludesHH(env, exclude=['UN.hh']) sources, tests, includes = SENFSCons.Glob(env) diff --git a/Socket/SConscript b/Socket/SConscript index aac2ec5..2e9bd62 100644 --- a/Socket/SConscript +++ b/Socket/SConscript @@ -7,8 +7,7 @@ import SENFSCons, glob SConscript(glob.glob("*/SConscript")) -SENFSCons.AllIncludesHH(env, [ f for f in glob.glob("*.hh") - if f not in ('all_includes.hh','Socket.hh') and not f.endswith('.test.hh') ]) +SENFSCons.AllIncludesHH(env, exclude=['Socket.hh']) sources, tests, includes = SENFSCons.Glob(env) diff --git a/Utils/Logger/SConscript b/Utils/Logger/SConscript index af32a01..dd2bd23 100644 --- a/Utils/Logger/SConscript +++ b/Utils/Logger/SConscript @@ -5,9 +5,7 @@ import SENFSCons, glob ########################################################################### -SENFSCons.AllIncludesHH(env, [ f for f in glob.glob("*.hh") - if ( f not in ('all_includes.hh','Logger.hh','SenfLog.hh') - and not f.endswith('.test.hh') ) ]) +SENFSCons.AllIncludesHH(env, exclude=['Logger.hh','SenfLog.hh']) sources, tests, includes = SENFSCons.Glob(env) diff --git a/Utils/Termlib/SConscript b/Utils/Termlib/SConscript index 9ec4988..9d1978a 100644 --- a/Utils/Termlib/SConscript +++ b/Utils/Termlib/SConscript @@ -11,4 +11,4 @@ env.Append(ALLOBJECTS = env.Object(sources)) env.BoostUnitTest('test', tests) SENFSCons.Doxygen(env) env.InstallSubdir('$INCLUDEINSTALLDIR', includes) -env.Program('telnetSserver', ['telnetServer.cc']) +env.Program('telnetServer', ['telnetServer.cc']) diff --git a/debian/SConscript b/debian/SConscript index 548c560..1233a2e 100644 --- a/debian/SConscript +++ b/debian/SConscript @@ -1,7 +1,7 @@ # -*- python -*- Import('env') -import SENFSCons, os +import SENFSCons, os, os.path, pwd, time, string ########################################################################### diff --git a/senfscons/SENFSCons.py b/senfscons/SENFSCons.py index bdb44f0..ba49af5 100644 --- a/senfscons/SENFSCons.py +++ b/senfscons/SENFSCons.py @@ -79,7 +79,10 @@ def Doxygen(env, doxyfile = "Doxyfile", extra_sources = []): return doc -def AllIncludesHH(env, headers): +def AllIncludesHH(env, exclude=[]): + exclude = exclude[:] + ['all_includes.hh'] # Make a copy !! + headers = [ f for f in glob.glob("*.hh") + if f not in exclude and not f.endswith('.test.hh') ] headers.sort() target = env.File("all_includes.hh") file(target.abspath,"w").write("".join([ '#include "%s"\n' % f