Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(958)

Side by Side Diff: tools/gn/command_help.cc

Issue 46003002: Add a target in GN that generates a last_change.h file for the SVN revision. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 PrintShortHelp( 44 PrintShortHelp(
45 "--root: Specifies source root (overrides .gn file)."); 45 "--root: Specifies source root (overrides .gn file).");
46 PrintShortHelp( 46 PrintShortHelp(
47 "--secondary: Specifies secondary source root (overrides .gn file)."); 47 "--secondary: Specifies secondary source root (overrides .gn file).");
48 PrintShortHelp( 48 PrintShortHelp(
49 "--time: Outputs a summary of how long everything took."); 49 "--time: Outputs a summary of how long everything took.");
50 PrintShortHelp( 50 PrintShortHelp(
51 "--tracelog: Writes a Chrome-compatible trace log to the given file."); 51 "--tracelog: Writes a Chrome-compatible trace log to the given file.");
52 PrintShortHelp( 52 PrintShortHelp(
53 "-v: Verbose mode, print lots of logging."); 53 "-v: Verbose mode, print lots of logging.");
54 PrintShortHelp(
55 "--version: Print the GN binary's version and exit.");
54 56
55 // Functions. 57 // Functions.
56 OutputString("\nBuildfile functions (type \"gn help <function>\" for more " 58 OutputString("\nBuildfile functions (type \"gn help <function>\" for more "
57 "details):\n"); 59 "details):\n");
58 const functions::FunctionInfoMap& function_map = functions::GetFunctions(); 60 const functions::FunctionInfoMap& function_map = functions::GetFunctions();
59 std::vector<std::string> sorted_functions; 61 std::vector<std::string> sorted_functions;
60 for (functions::FunctionInfoMap::const_iterator i = function_map.begin(); 62 for (functions::FunctionInfoMap::const_iterator i = function_map.begin();
61 i != function_map.end(); ++i) 63 i != function_map.end(); ++i)
62 sorted_functions.push_back(i->first.as_string()); 64 sorted_functions.push_back(i->first.as_string());
63 std::sort(sorted_functions.begin(), sorted_functions.end()); 65 std::sort(sorted_functions.begin(), sorted_functions.end());
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 return 0; 169 return 0;
168 } 170 }
169 171
170 // No help on this. 172 // No help on this.
171 Err(Location(), "No help on \"" + args[0] + "\".").PrintToStdout(); 173 Err(Location(), "No help on \"" + args[0] + "\".").PrintToStdout();
172 RunHelp(std::vector<std::string>()); 174 RunHelp(std::vector<std::string>());
173 return 1; 175 return 1;
174 } 176 }
175 177
176 } // namespace commands 178 } // namespace commands
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698