// Writes a .ninja file for a action target type.
class NinjaActionTargetWriter : public NinjaTargetWriter {
public:
- NinjaActionTargetWriter(const Target* target,
- const Toolchain* toolchain,
- std::ostream& out);
+ NinjaActionTargetWriter(const Target* target, std::ostream& out);
virtual ~NinjaActionTargetWriter();
virtual void Run() OVERRIDE;
FRIEND_TEST_ALL_PREFIXES(NinjaActionTargetWriter,
WriteArgsSubstitutions);
- bool has_sources() const { return !target_->sources().empty(); }
-
// Writes the Ninja rule for invoking the script.
//
// Returns the name of the custom rule generated. This will be based on the
// Writes the rules for compiling each source, writing all output files
// to the given vector.
//
- // implicit_deps is a precomputed string of all ninja files that are common
- // to each build step, it starts with a "|" if it's nonempty.
+ // input_dep is a file expressing the depencies common to all build steps.
+ // It will be a stamp file if there is more than one.
void WriteSourceRules(const std::string& custom_rule_name,
- const std::string& implicit_deps,
+ const OutputFile& input_dep,
std::vector<OutputFile>* output_files);
- // Writes the .stamp rule that names this target and collects all invocations
- // of the script into one thing that other targets can depend on.
- void WriteStamp(const std::vector<OutputFile>& output_files);
-
// Writes the output files generated by the output template for the given
// source file. This will start with a space and will not include a newline.
// Appends the output files to the given vector.