]> git.tdb.fi Git - builder.git/blobdiff - source/tool.cpp
Separate the command-line interface into its own class
[builder.git] / source / tool.cpp
index 5556cb346e7c1efeeee808aa275818545f185518..cefbb8c3b0188c58d525b87def1a5b694f3a40df 100644 (file)
@@ -5,7 +5,16 @@ using namespace std;
 
 Tool::Tool(Builder &b, const string &t):
        builder(b),
-       tag(t)
+       architecture(0),
+       tag(t),
+       executable(0)
+{ }
+
+Tool::Tool(Builder &b, const Architecture &a, const string &t):
+       builder(b),
+       architecture(&a),
+       tag(t),
+       executable(0)
 { }
 
 bool Tool::accepts_suffix(const string &suffix, bool aux) const
@@ -24,3 +33,9 @@ Target *Tool::create_target(Target &source, const string &arg) const
        sources.push_back(&source);
        return create_target(sources, arg);
 }
+
+
+SubTool::SubTool(Tool &p):
+       Tool(p),
+       parent(p)
+{ }