| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <algorithm> | 5 #include <algorithm> |
| 6 #include <iostream> | 6 #include <iostream> |
| 7 | 7 |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "tools/gn/args.h" | 9 #include "tools/gn/args.h" |
| 10 #include "tools/gn/commands.h" | 10 #include "tools/gn/commands.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // Target variables. | 55 // Target variables. |
| 56 OutputString("\nVariables you set in targets (type \"gn help <variable>\" " | 56 OutputString("\nVariables you set in targets (type \"gn help <variable>\" " |
| 57 "for more details):\n"); | 57 "for more details):\n"); |
| 58 for (const auto& target : variables::GetTargetVariables()) | 58 for (const auto& target : variables::GetTargetVariables()) |
| 59 PrintShortHelp(target.second.help_short); | 59 PrintShortHelp(target.second.help_short); |
| 60 | 60 |
| 61 OutputString("\nOther help topics:\n"); | 61 OutputString("\nOther help topics:\n"); |
| 62 PrintShortHelp("all: Print all the help at once"); | 62 PrintShortHelp("all: Print all the help at once"); |
| 63 PrintShortHelp("buildargs: How build arguments work."); | 63 PrintShortHelp("buildargs: How build arguments work."); |
| 64 PrintShortHelp("dotfile: Info about the toplevel .gn file."); | 64 PrintShortHelp("dotfile: Info about the toplevel .gn file."); |
| 65 PrintShortHelp("grammar: Formal grammar for GN build files."); | 65 PrintShortHelp("grammar: Language and grammar for GN build files."); |
| 66 PrintShortHelp( | 66 PrintShortHelp( |
| 67 "input_conversion: Processing input from exec_script and read_file."); | 67 "input_conversion: Processing input from exec_script and read_file."); |
| 68 PrintShortHelp("label_pattern: Matching more than one label."); | 68 PrintShortHelp("label_pattern: Matching more than one label."); |
| 69 PrintShortHelp("nogncheck: Annotating includes for checking."); | 69 PrintShortHelp("nogncheck: Annotating includes for checking."); |
| 70 PrintShortHelp("runtime_deps: How runtime dependency computation works."); | 70 PrintShortHelp("runtime_deps: How runtime dependency computation works."); |
| 71 PrintShortHelp("source_expansion: Map sources to outputs for scripts."); | 71 PrintShortHelp("source_expansion: Map sources to outputs for scripts."); |
| 72 PrintShortHelp("switches: Show available command-line switches."); | 72 PrintShortHelp("switches: Show available command-line switches."); |
| 73 } | 73 } |
| 74 | 74 |
| 75 void PrintSwitchHelp() { | 75 void PrintSwitchHelp() { |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 OutputString("Run `gn help` for a list of available topics.\n", | 267 OutputString("Run `gn help` for a list of available topics.\n", |
| 268 DECORATION_NONE); | 268 DECORATION_NONE); |
| 269 } else { | 269 } else { |
| 270 OutputString("Did you mean `gn help " + suggestion.as_string() + "`?\n", | 270 OutputString("Did you mean `gn help " + suggestion.as_string() + "`?\n", |
| 271 DECORATION_NONE); | 271 DECORATION_NONE); |
| 272 } | 272 } |
| 273 return 1; | 273 return 1; |
| 274 } | 274 } |
| 275 | 275 |
| 276 } // namespace commands | 276 } // namespace commands |
| OLD | NEW |