]> git.tdb.fi Git - builder.git/commitdiff
Make BuildInfo uniquify things implicitly after update
authorMikko Rasa <tdb@tdb.fi>
Fri, 8 Jun 2012 22:58:04 +0000 (01:58 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 8 Jul 2012 21:08:53 +0000 (00:08 +0300)
source/buildinfo.cpp
source/buildinfo.h
source/component.cpp
source/sourcepackage.cpp

index 463357dd32d37d19dd31266bc538f7e288051c46..ec8156798d70628d0597e6936ecd39622d9fff58 100644 (file)
@@ -48,6 +48,8 @@ void BuildInfo::update_from(const BuildInfo &bi, UpdateLevel level)
                optimize = bi.optimize;
                strip = bi.strip;
        }
+
+       unique();
 }
 
 void BuildInfo::unique()
index 18f33a093676a2d98c54b4a3c2c9a338d8c10df7..297efff1df0c915ee4d51a31d831d0051ed58293 100644 (file)
@@ -52,6 +52,7 @@ public:
        The update level determines what information is updated. */
        void update_from(const BuildInfo &, UpdateLevel = LOCAL);
 
+private:
        /** Makes sure there are no duplicate entries in the lists.  For warnings,
        contradicting flags are eliminated and the last one stays in effect. */
        void unique();
index cc4796cdee867cd9d9aea23d311951d4f091965a..c4908c99a4986f9a0beeec2a8f78acbfd15c7c5e 100644 (file)
@@ -77,8 +77,6 @@ void Component::create_build_info()
 
        if(type==PROGRAM)
                build_info.strip = lexical_cast<bool>(pkg.get_config().get_option("strip").value);
-
-       build_info.unique();
 }
 
 void Component::create_targets() const
index 60276daff288bb48cc2292bf12e91f5b88d882e2..7d0ed1d97095f034ff074a8d46858ddb9a36db11 100644 (file)
@@ -218,16 +218,12 @@ void SourcePackage::create_build_info()
                if(i->eval())
                        build_info.update_from(i->get_build_info());
 
-       build_info.unique();
-
        for(list<Component>::iterator i=components.begin(); i!=components.end(); ++i)
        {
                i->create_build_info();
                if(i->get_type()==Component::LIBRARY)
                        export_binfo.libs.push_back(i->get_name());
        }
-
-       export_binfo.unique();
 }