mirror of
https://github.com/reactos/ninja.git
synced 2025-02-17 01:58:03 +00:00
drop the "rules" tool completely
I had already broken this earlier, but the refactor of variable handling broke it completely.
This commit is contained in:
parent
94ea3e9d08
commit
34b46f28c5
@ -263,10 +263,6 @@ several times. If used like this +ninja -t targets all+ it
|
||||
prints all the targets available without indentation and it is faster
|
||||
than the _depth_ mode.
|
||||
|
||||
`rules`:: output the list of all rules with their description if they have
|
||||
one. It can be used to know which rule name to pass to
|
||||
+ninja -t targets rule _name_+.
|
||||
|
||||
`commands`:: given a list of targets, print a list of commands which, if
|
||||
executed in order, may be used to rebuild those targets, assuming that all
|
||||
output files are out of date.
|
||||
|
19
src/ninja.cc
19
src/ninja.cc
@ -410,23 +410,6 @@ int ToolTargets(Globals* globals, int argc, char* argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
int ToolRules(Globals* globals, int argc, char* /* argv */[]) {
|
||||
for (map<string, const Rule*>::iterator i = globals->state->rules_.begin();
|
||||
i != globals->state->rules_.end(); ++i) {
|
||||
if (i->second->description().empty()) {
|
||||
printf("%s\n", i->first.c_str());
|
||||
} else {
|
||||
printf("%s: %s\n",
|
||||
i->first.c_str(),
|
||||
// XXX I changed it such that we don't have an easy way
|
||||
// to get the source text anymore, so this output is
|
||||
// unsatisfactory. How useful is this command, anyway?
|
||||
i->second->description().Serialize().c_str());
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void PrintCommands(Edge* edge, set<Edge*>* seen) {
|
||||
if (!edge)
|
||||
return;
|
||||
@ -551,8 +534,6 @@ int ChooseTool(const string& tool_name, const Tool** tool_out) {
|
||||
Tool::RUN_AFTER_LOAD, ToolGraph },
|
||||
{ "query", "show inputs/outputs for a path",
|
||||
Tool::RUN_AFTER_LOAD, ToolQuery },
|
||||
{ "rules", "list all rules",
|
||||
Tool::RUN_AFTER_LOAD, ToolRules },
|
||||
{ "targets", "list targets by their rule or depth in the DAG",
|
||||
Tool::RUN_AFTER_LOAD, ToolTargets },
|
||||
{ "urtle", NULL,
|
||||
|
Loading…
x
Reference in New Issue
Block a user