]> git.tdb.fi Git - builder.git/blob - source/datapack.cpp
Save caches before starting the build
[builder.git] / source / datapack.cpp
1 #include "component.h"
2 #include "datapack.h"
3 #include "sourcepackage.h"
4
5 using namespace std;
6
7 DataPack::DataPack(Builder &b, const Component &c, const list<FileTarget *> &f):
8         FileTarget(b, c.get_package(), generate_target_path(c)),
9         files(f)
10 {
11         component = &c;
12         for(list<FileTarget *>::const_iterator i=files.begin(); i!=files.end(); ++i)
13                 add_dependency(**i);
14
15         install_location = Msp::FS::Path("share")/package->get_name();
16 }
17
18 Msp::FS::Path DataPack::generate_target_path(const Component &comp)
19 {
20         return comp.get_package().get_output_directory()/(comp.get_name()+".mdp");
21 }