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 "tools/gn/args.h" | 8 #include "tools/gn/args.h" |
9 #include "tools/gn/commands.h" | 9 #include "tools/gn/commands.h" |
10 #include "tools/gn/err.h" | 10 #include "tools/gn/err.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 void PrintToplevelHelp() { | 23 void PrintToplevelHelp() { |
24 OutputString("Commands (type \"gn help <command>\" for more details):\n"); | 24 OutputString("Commands (type \"gn help <command>\" for more details):\n"); |
25 | 25 |
26 const commands::CommandInfoMap& command_map = commands::GetCommands(); | 26 const commands::CommandInfoMap& command_map = commands::GetCommands(); |
27 for (commands::CommandInfoMap::const_iterator i = command_map.begin(); | 27 for (commands::CommandInfoMap::const_iterator i = command_map.begin(); |
28 i != command_map.end(); ++i) | 28 i != command_map.end(); ++i) |
29 PrintShortHelp(i->second.help_short); | 29 PrintShortHelp(i->second.help_short); |
30 | 30 |
31 OutputString( | 31 OutputString( |
32 "\n" | 32 "\n" |
33 " When run with no arguments \"gn gen\" is assumed.\n" | |
34 "\n" | |
35 "Common switches:\n"); | 33 "Common switches:\n"); |
36 PrintShortHelp( | 34 PrintShortHelp( |
37 "--args: Specifies build arguments overrides. " | 35 "--args: Specifies build arguments overrides. " |
38 "See \"gn help buildargs\"."); | 36 "See \"gn help buildargs\"."); |
39 PrintShortHelp( | 37 PrintShortHelp( |
40 "--no-exec: Skips exec_script calls (for performance testing)."); | 38 "--no-exec: Skips exec_script calls (for performance testing)."); |
41 PrintShortHelp( | 39 PrintShortHelp( |
42 "-q: Quiet mode, don't print anything on success."); | 40 "-q: Quiet mode, don't print anything on success."); |
43 PrintShortHelp( | 41 PrintShortHelp( |
44 "--output: Directory for build output (relative to source root)."); | 42 "--output: Directory for build output (relative to source root)."); |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 return 0; | 168 return 0; |
171 } | 169 } |
172 | 170 |
173 // No help on this. | 171 // No help on this. |
174 Err(Location(), "No help on \"" + args[0] + "\".").PrintToStdout(); | 172 Err(Location(), "No help on \"" + args[0] + "\".").PrintToStdout(); |
175 RunHelp(std::vector<std::string>()); | 173 RunHelp(std::vector<std::string>()); |
176 return 1; | 174 return 1; |
177 } | 175 } |
178 | 176 |
179 } // namespace commands | 177 } // namespace commands |
OLD | NEW |