throw invalid_argument("DataTool::create_target");
}
+string DataTool::create_build_signature(const BuildInfo &binfo) const
+{
+ string result;
+ if(binfo.debug)
+ result += 'g';
+ if(binfo.optimize>0)
+ {
+ result += 'b';
+ if(binfo.optimize>1)
+ result += 'z';
+ }
+ return result;
+}
+
Task *DataTool::run(const Target &tgt) const
{
const Component &comp = *tgt.get_component();
virtual Target *create_source(const Component &, const Msp::FS::Path &) const;
virtual Target *create_target(const std::list<Target *> &, const std::string &);
+ virtual std::string create_build_signature(const BuildInfo &) const;
virtual Task *run(const Target &) const;
};
return lib;
}
+string GnuArchiver::create_build_signature(const BuildInfo &) const
+{
+ return FS::basename(executable->get_path());
+}
+
Task *GnuArchiver::run(const Target &target) const
{
const StaticLibrary &lib = dynamic_cast<const StaticLibrary &>(target);
GnuArchiver(Builder &, const Architecture &);
virtual Target *create_target(const std::list<Target *> &, const std::string &);
+ virtual std::string create_build_signature(const BuildInfo &) const;
virtual Task *run(const Target &) const;
};
result += 'd';
if(binfo.strip)
result += 's';
- result += ",l";
- result += join(binfo.libs.begin(), binfo.libs.end(), ",l");
+ if(!binfo.libs.empty())
+ {
+ result += ",l";
+ result += join(binfo.libs.begin(), binfo.libs.end(), ",l");
+ }
return result;
}