1 #include <msp/fs/dir.h>
2 #include <msp/fs/utils.h>
5 #include "datacompile.h"
8 #include "sourcepackage.h"
12 DataCompile::DataCompile(Builder &b, ::DataFile &dfile):
15 const Component &comp = dfile.get_component();
17 work_dir = comp.get_package().get_source();
19 argv.push_back("mspdatatool");
23 FS::Path opath = dfile.get_path();
25 argv.push_back(relative(opath, work_dir).str());
27 FS::Path spath = dfile.get_source().get_path();
28 argv.push_back(relative(spath, work_dir).str());
30 if(!builder.get_dry_run())
31 FS::mkpath(FS::dirname(opath), 0755);
33 announce(comp.get_package().get_name(), "DATA", relative(opath, work_dir).str());