From: g0dil Date: Tue, 9 Sep 2008 14:17:28 +0000 (+0000) Subject: Some adjustments for Ubuntu 8.04 X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=46ce25973f087d30ca10eebdad6e3bfa7586ecc9;p=senf.git Some adjustments for Ubuntu 8.04 git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@905 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Packets/VariantParser.ih b/Packets/VariantParser.ih index 79db6c7..275cff1 100644 --- a/Packets/VariantParser.ih +++ b/Packets/VariantParser.ih @@ -149,7 +149,7 @@ namespace detail { template \ struct BOOST_PP_CAT(name, _key_value_template) \ : public senf::detail::VariantKey {}; \ - template friend class senf::detail::VariantKey; \ + template friend class senf::detail::VariantKey; \ typedef senf::detail::VariantKeyTransform< \ BOOST_PP_CAT(name,_chooser_value_type), \ boost::mpl::vector< \ diff --git a/Packets/VariantParser.test.cc b/Packets/VariantParser.test.cc index e215a89..2ea65d4 100644 --- a/Packets/VariantParser.test.cc +++ b/Packets/VariantParser.test.cc @@ -78,7 +78,10 @@ BOOST_AUTO_UNIT_TEST(VariantParser) }; } -namespace { +// We can't use the unnamed namespace here since there's a bug in gcc-4.2.3 which is +// the default version of gcc on ubuntu hardy :-( +// See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34213 +namespace VariantParser_test_cc_anon_namespace { struct SubParser : public senf::PacketParserBase { @@ -97,8 +100,7 @@ namespace { SENF_PARSER_SKIP_BITS( 4 ); SENF_PARSER_BITFIELD_RO( type, 4, unsigned ); SENF_PARSER_VARIANT( content_, type, - ( novalue( nocontent -, key(10, senf::VoidPacketParser)) ) + ( novalue( nocontent, key(10, senf::VoidPacketParser)) ) ( id( content, SubParser ) ) ); @@ -106,6 +108,7 @@ namespace { }; } +using namespace VariantParser_test_cc_anon_namespace; BOOST_AUTO_UNIT_TEST(VariantParserMacro) { diff --git a/senfscons/InstallIncludes.py b/senfscons/InstallIncludes.py index dc9c817..d9bb8f4 100644 --- a/senfscons/InstallIncludes.py +++ b/senfscons/InstallIncludes.py @@ -17,20 +17,20 @@ def recursiveChildren(f): rv = {} map(rv.setdefault,f) for c in f: - map(rv.setdefault,recursiveChildren(c.children())) + if c is not None : map(rv.setdefault,recursiveChildren(c.children())) return rv.keys() def filterIncludes(files, extensions): return [ f for f in files - if f.get_suffix() in extensions ] + if f is not None and f.get_suffix() in extensions ] def filterIncludesInv(files, extensions): return [ f for f in files - if '.' + str(f).split('.',1)[-1] not in extensions ] + if f is not None and '.' + str(f).split('.',1)[-1] not in extensions ] def filterDirectory(files, dir): return [ f for f in files - if f.abspath.startswith(dir.abspath) ] + if f is not None and f.abspath.startswith(dir.abspath) ] def excludeDirectories(files, dirs): return [ f for f in files diff --git a/senfscons/SENFSCons.py b/senfscons/SENFSCons.py index c8ff57c..60e175a 100644 --- a/senfscons/SENFSCons.py +++ b/senfscons/SENFSCons.py @@ -317,7 +317,8 @@ def Test(env, sources, LIBS = [], OBJECTS = []): if compileTestSources: test.extend(env.CompileCheck(source = compileTestSources)) env.Alias('all_tests', test) - env.Alias(env.File('test'), test) + env.Command(env.File('test'), test, []) + #env.Alias(env.File('test'), test) ## \brief Build object files @@ -348,10 +349,10 @@ def Objects(env, sources, testSources = None, LIBS = [], OBJECTS = [], no_includ if sources: obsources = [ source for source in sources - if not str(source).endswith('.o') ] + if type(source) is type('') and not source.endswith('.o') ] objects = [ source for source in sources - if str(source).endswith('.o') ] + if type(source) is not type('') or source.endswith('.o') ] if obsources: objects += env.Object(obsources) @@ -371,7 +372,8 @@ def Objects(env, sources, testSources = None, LIBS = [], OBJECTS = [], no_includ # Hmm ... here I'd like to use an Alias instead of a file # however the alias does not seem to live in the subdirectory # which breaks 'scons -u test' - env.Alias(env.File('test'), test) + env.Command(env.File('test'), test, []) + #env.Alias(env.File('test'), test) return objects