OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <set> | 6 #include <set> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "tools/gn/commands.h" | 9 #include "tools/gn/commands.h" |
10 #include "tools/gn/label_pattern.h" | 10 #include "tools/gn/label_pattern.h" |
11 #include "tools/gn/setup.h" | 11 #include "tools/gn/setup.h" |
12 #include "tools/gn/standard_out.h" | 12 #include "tools/gn/standard_out.h" |
13 #include "tools/gn/target.h" | 13 #include "tools/gn/target.h" |
14 | 14 |
15 namespace commands { | 15 namespace commands { |
16 | 16 |
17 const char kLs[] = "ls"; | 17 const char kLs[] = "ls"; |
18 const char kLs_HelpShort[] = | 18 const char kLs_HelpShort[] = |
19 "ls: List matching targets."; | 19 "ls: List matching targets."; |
20 const char kLs_Help[] = | 20 const char kLs_Help[] = |
21 "gn ls <build dir> [<label_pattern>] [--out] [--all-toolchains]\n" | 21 "gn ls <out_dir> [<label_pattern>] [--out] [--all-toolchains]\n" |
22 "\n" | 22 "\n" |
23 " Lists all targets matching the given pattern for the given builn\n" | 23 " Lists all targets matching the given pattern for the given builn\n" |
24 " directory. By default, only targets in the default toolchain will\n" | 24 " directory. By default, only targets in the default toolchain will\n" |
25 " be matched unless a toolchain is explicitly supplied.\n" | 25 " be matched unless a toolchain is explicitly supplied.\n" |
26 "\n" | 26 "\n" |
27 " If the label pattern is unspecified, list all targets. The label\n" | 27 " If the label pattern is unspecified, list all targets. The label\n" |
28 " pattern is not a general regular expression (see\n" | 28 " pattern is not a general regular expression (see\n" |
29 " \"gn help label_pattern\"). If you need more complex expressions,\n" | 29 " \"gn help label_pattern\"). If you need more complex expressions,\n" |
30 " pipe the result through grep.\n" | 30 " pipe the result through grep.\n" |
31 "\n" | 31 "\n" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 OutputString(match.GetUserVisibleName( | 110 OutputString(match.GetUserVisibleName( |
111 match.GetToolchainLabel() != default_tc_label)); | 111 match.GetToolchainLabel() != default_tc_label)); |
112 OutputString("\n"); | 112 OutputString("\n"); |
113 } | 113 } |
114 } | 114 } |
115 | 115 |
116 return 0; | 116 return 0; |
117 } | 117 } |
118 | 118 |
119 } // namespace commands | 119 } // namespace commands |
OLD | NEW |