]> git.tdb.fi Git - builder.git/commitdiff
Properly handle default and install options for datafiles
authorMikko Rasa <tdb@tdb.fi>
Mon, 21 Sep 2009 09:54:09 +0000 (09:54 +0000)
committerMikko Rasa <tdb@tdb.fi>
Mon, 21 Sep 2009 09:54:09 +0000 (09:54 +0000)
source/component.cpp

index 26ce71058dfd79edf38b5006e2d5620cd82261b3..e96ac220cf48ed2d2525a4d6f1a21183503394c6 100644 (file)
@@ -145,7 +145,13 @@ void Component::create_targets() const
                else
                        source=new File(builder, pkg, files.front());
                ::DataFile *result=new ::DataFile(builder, *this, *source);
-               inst_list.push_back(result);
+
+               if(&pkg==builder.get_main_package() && deflt)
+                       def_tgt->add_depend(result);
+               else
+                       world->add_depend(result);
+               if(install)
+                       inst_list.push_back(result);
        }
        else
        {