6 #include <msp/fs/path.h>
14 Base class for tools. Tools are used to turn targets into other targets.
15 Examples include compilers and linkers.
20 typedef std::list<Msp::FS::Path> SearchPath;
21 typedef std::list<std::string> SuffixList;
26 SuffixList input_suffixes;
27 SuffixList aux_suffixes;
28 SearchPath system_path;
30 Tool(Builder &, const std::string &);
34 const std::string &get_tag() const { return tag; }
35 const SuffixList &get_input_suffixes() const { return input_suffixes; }
36 const SuffixList &get_auxiliary_suffixes() const { return aux_suffixes; }
37 bool accepts_suffix(const std::string &, bool = false) const;
38 const SearchPath &get_system_path() const { return system_path; }
40 virtual Target *create_source(const Component &, const Msp::FS::Path &) const { return 0; }
41 virtual Target *create_source(const Msp::FS::Path &) const { return 0; }
42 Target *create_target(Target &, const std::string & = std::string()) const;
43 virtual Target *create_target(const std::list<Target *> &, const std::string & = std::string()) const = 0;
44 virtual Task *run(const Target &) const = 0;