]> git.tdb.fi Git - builder.git/blobdiff - source/tool.h
Make targets depend on their tools
[builder.git] / source / tool.h
index 36d1be165b4f614a994d99ca08bcda4b37674ecd..7371103213b91f56483f630da8cada940d3fda66 100644 (file)
@@ -7,6 +7,7 @@
 
 class Builder;
 class Component;
+class FileTarget;
 class Target;
 class Task;
 
@@ -23,6 +24,7 @@ public:
 protected:
        Builder &builder;
        std::string tag;
+       FileTarget *executable;
        SuffixList input_suffixes;
        SuffixList aux_suffixes;
        SearchPath system_path;
@@ -32,6 +34,8 @@ public:
        virtual ~Tool() { }
 
        const std::string &get_tag() const { return tag; }
+       // XXX The executable target should be retrieved when first needed
+       FileTarget *get_executable() const { return executable; }
        const SuffixList &get_input_suffixes() const { return input_suffixes; }
        const SuffixList &get_auxiliary_suffixes() const { return aux_suffixes; }
        bool accepts_suffix(const std::string &, bool = false) const;