}
-Target *SubTool::create_source(const Component &c, const FS::Path &p) const
-{
- return parent.create_source(c, p);
-}
-
-Target *SubTool::create_source(const FS::Path &p) const
-{
- return parent.create_source(p);
-}
-
-Target *SubTool::create_target(const vector<Target *> &s, const string &a)
-{
- return parent.create_target(s, a);
-}
-
-Target *SubTool::create_install(Target &t) const
-{
- return parent.create_install(t);
-}
-
-string SubTool::create_build_signature(const BuildInfo &bi) const
-{
- return parent.create_build_signature(bi);
-}
-
-
void operator>>(const LexicalConverter &conv, Tool::ProcessingUnit &unit)
{
const string &str = conv.get();
Task *run(const Target &t) const { return run_func(t); }
};
-/**
-Intermediate base class for tool facets. For example, a linker may need to
-use different commands depending on whether C++ source files are present or
-not, but their presence can't be directly determined from the object files.
-*/
-class SubTool: public Tool
-{
-protected:
- Tool &parent;
-
- SubTool(Tool &t): Tool(t), parent(t) { }
-
-public:
- Target *create_source(const Component &, const Msp::FS::Path &) const override;
- Target *create_source(const Msp::FS::Path &) const override;
- Target *create_target(const std::vector<Target *> &, const std::string & = std::string()) override;
- Target *create_install(Target &) const override;
- std::string create_build_signature(const BuildInfo &) const override;
-};
-
template<typename T>
void Tool::set_run(Task *(*f)(const T &))