#include "version.h"
ManifestParser::ManifestParser(State* state, FileReader* file_reader)
- : state_(state), file_reader_(file_reader) {
+ : state_(state), file_reader_(file_reader), quiet_(false) {
env_ = &state->bindings_;
}
if (!CanonicalizePath(&path, &slash_bits, &path_err))
return lexer_.Error(path_err, err);
if (!state_->AddOut(edge, path, slash_bits)) {
- Warning("multiple rules generate %s. "
- "builds involving this target will not be correct; "
- "continuing anyway",
- path.c_str());
+ if (!quiet_) {
+ Warning("multiple rules generate %s. "
+ "builds involving this target will not be correct; "
+ "continuing anyway",
+ path.c_str());
+ }
}
}
if (edge->outputs_.empty()) {
/// Parse a text string of input. Used by tests.
bool ParseTest(const string& input, string* err) {
+ quiet_ = true;
return Parse("input", input, err);
}
BindingEnv* env_;
FileReader* file_reader_;
Lexer lexer_;
+ bool quiet_;
};
#endif // NINJA_MANIFEST_PARSER_H_