sources.push_back(&source);
return create_target(sources, arg);
}
+
+
+SubTool::SubTool(Tool &p):
+ Tool(p),
+ parent(p)
+{ }
virtual Task *run(const Target &) const = 0;
};
+/**
+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 &);
+};
+
#endif