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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 OutputString("\nOther help topics:\n"); | 64 OutputString("\nOther help topics:\n"); |
65 PrintShortHelp("all: Print all the help at once"); | 65 PrintShortHelp("all: Print all the help at once"); |
66 PrintShortHelp("buildargs: How build arguments work."); | 66 PrintShortHelp("buildargs: How build arguments work."); |
67 PrintShortHelp("dotfile: Info about the toplevel .gn file."); | 67 PrintShortHelp("dotfile: Info about the toplevel .gn file."); |
68 PrintShortHelp("execution: Build graph and execution overview."); | 68 PrintShortHelp("execution: Build graph and execution overview."); |
69 PrintShortHelp("grammar: Language and grammar for GN build files."); | 69 PrintShortHelp("grammar: Language and grammar for GN build files."); |
70 PrintShortHelp( | 70 PrintShortHelp( |
71 "input_conversion: Processing input from exec_script and read_file."); | 71 "input_conversion: Processing input from exec_script and read_file."); |
72 PrintShortHelp("label_pattern: Matching more than one label."); | 72 PrintShortHelp("label_pattern: Matching more than one label."); |
73 PrintShortHelp("labels: About labels."); | 73 PrintShortHelp("labels: About labels."); |
74 PrintShortHelp("ninja_rules: How Ninja build rules and named."); | 74 PrintShortHelp("ninja_rules: How Ninja build rules are named."); |
75 PrintShortHelp("nogncheck: Annotating includes for checking."); | 75 PrintShortHelp("nogncheck: Annotating includes for checking."); |
76 PrintShortHelp("runtime_deps: How runtime dependency computation works."); | 76 PrintShortHelp("runtime_deps: How runtime dependency computation works."); |
77 PrintShortHelp("source_expansion: Map sources to outputs for scripts."); | 77 PrintShortHelp("source_expansion: Map sources to outputs for scripts."); |
78 PrintShortHelp("switches: Show available command-line switches."); | 78 PrintShortHelp("switches: Show available command-line switches."); |
79 } | 79 } |
80 | 80 |
81 void PrintSwitchHelp() { | 81 void PrintSwitchHelp() { |
82 const base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess(); | 82 const base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess(); |
83 bool use_markdown = cmdline->HasSwitch(switches::kMarkdown); | 83 bool use_markdown = cmdline->HasSwitch(switches::kMarkdown); |
84 | 84 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 OutputString("Run `gn help` for a list of available topics.\n", | 280 OutputString("Run `gn help` for a list of available topics.\n", |
281 DECORATION_NONE); | 281 DECORATION_NONE); |
282 } else { | 282 } else { |
283 OutputString("Did you mean `gn help " + suggestion.as_string() + "`?\n", | 283 OutputString("Did you mean `gn help " + suggestion.as_string() + "`?\n", |
284 DECORATION_NONE); | 284 DECORATION_NONE); |
285 } | 285 } |
286 return 1; | 286 return 1; |
287 } | 287 } |
288 | 288 |
289 } // namespace commands | 289 } // namespace commands |
OLD | NEW |