]> git.tdb.fi Git - builder.git/blob - source/lib/exportdefinitions.cpp
Refactor transitive dependencies to work on all targets
[builder.git] / source / lib / exportdefinitions.cpp
1 #include "component.h"
2 #include "exportdefinitions.h"
3 #include "objectfile.h"
4 #include "sourcepackage.h"
5
6 using namespace std;
7 using namespace Msp;
8
9 ExportDefinitions::ExportDefinitions(Builder &b, const Component &c, const vector<ObjectFile *> &objs):
10         FileTarget(b, c.get_package(), generate_target_path(c))
11 {
12         component = &c;
13         for(ObjectFile *o: objs)
14                 add_dependency(*o);
15 }
16
17 FS::Path ExportDefinitions::generate_target_path(const Component &comp)
18 {
19         return comp.get_package().get_temp_directory()/comp.get_name()/(comp.get_name()+".def");
20 }