| 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 "base/atomicops.h" | 5 #include "base/atomicops.h" |
| 6 #include "base/bind.h" | 6 #include "base/bind.h" |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/timer/elapsed_timer.h" | 10 #include "base/timer/elapsed_timer.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 " gn gen <out_dir>\n" | 155 " gn gen <out_dir>\n" |
| 156 "\n" | 156 "\n" |
| 157 " Generates ninja files from the current tree and puts them in the given\n" | 157 " Generates ninja files from the current tree and puts them in the given\n" |
| 158 " output directory.\n" | 158 " output directory.\n" |
| 159 "\n" | 159 "\n" |
| 160 " The output directory can be a source-repo-absolute path name such as:\n" | 160 " The output directory can be a source-repo-absolute path name such as:\n" |
| 161 " //out/foo\n" | 161 " //out/foo\n" |
| 162 " Or it can be a directory relative to the current directory such as:\n" | 162 " Or it can be a directory relative to the current directory such as:\n" |
| 163 " out/foo\n" | 163 " out/foo\n" |
| 164 "\n" | 164 "\n" |
| 165 " See \"gn help\" for the common command-line switches.\n"; | 165 " See \"gn help switches\" for the common command-line switches.\n"; |
| 166 | 166 |
| 167 int RunGen(const std::vector<std::string>& args) { | 167 int RunGen(const std::vector<std::string>& args) { |
| 168 base::ElapsedTimer timer; | 168 base::ElapsedTimer timer; |
| 169 | 169 |
| 170 if (args.size() != 1) { | 170 if (args.size() != 1) { |
| 171 Err(Location(), "Need exactly one build directory to generate.", | 171 Err(Location(), "Need exactly one build directory to generate.", |
| 172 "I expected something more like \"gn gen out/foo\"\n" | 172 "I expected something more like \"gn gen out/foo\"\n" |
| 173 "You can also see \"gn help gen\".").PrintToStdout(); | 173 "You can also see \"gn help gen\".").PrintToStdout(); |
| 174 return 1; | 174 return 1; |
| 175 } | 175 } |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 setup->scheduler().input_file_manager()->GetInputFileCount()) + | 222 setup->scheduler().input_file_manager()->GetInputFileCount()) + |
| 223 " files in " + | 223 " files in " + |
| 224 base::Int64ToString(elapsed_time.InMilliseconds()) + "ms\n"; | 224 base::Int64ToString(elapsed_time.InMilliseconds()) + "ms\n"; |
| 225 OutputString(stats); | 225 OutputString(stats); |
| 226 } | 226 } |
| 227 | 227 |
| 228 return 0; | 228 return 0; |
| 229 } | 229 } |
| 230 | 230 |
| 231 } // namespace commands | 231 } // namespace commands |
| OLD | NEW |