2 #include <msp/strings/format.h>
3 #include "architecture.h"
10 Tool::Tool(Builder &b, const string &t):
18 Tool::Tool(Builder &b, const Architecture &a, const string &t):
26 bool Tool::accepts_suffix(const string &suffix, bool aux) const
28 if(find(input_suffixes.begin(), input_suffixes.end(), suffix)!=input_suffixes.end())
31 return find(aux_suffixes.begin(), aux_suffixes.end(), suffix)!=aux_suffixes.end();
36 Target *Tool::create_target(Target &source, const string &arg)
38 list<Target *> sources;
39 sources.push_back(&source);
40 return create_target(sources, arg);
52 void Tool::set_executable(const string &command, bool cross)
54 if(cross && architecture->is_cross())
55 return set_executable(format("%s-%s", architecture->get_cross_prefix(), command), false);
57 executable = builder.get_vfs().find_binary(command);
59 builder.problem(string(), format("Can't find executable %s for tool %s", command, tag));
63 SubTool::SubTool(Tool &p):