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

Unified Diff: tools/gn/command_desc.cc

Issue 2481423002: Convert gn docstrings to C++11 raw strings. (Closed)
Patch Set: Fixes Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/command_check.cc ('k') | tools/gn/command_format.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/command_desc.cc
diff --git a/tools/gn/command_desc.cc b/tools/gn/command_desc.cc
index 27117c53be2b62b772ae366d356f8f096b1494bf..2257221aaecd4502637b16570cda9ec16dd8ddc0 100644
--- a/tools/gn/command_desc.cc
+++ b/tools/gn/command_desc.cc
@@ -291,134 +291,133 @@ const char kDesc[] = "desc";
const char kDesc_HelpShort[] =
"desc: Show lots of insightful information about a target or config.";
const char kDesc_Help[] =
- "gn desc <out_dir> <label or pattern> [<what to show>] [--blame] "
- "[--format=json]\n"
- "\n"
- " Displays information about a given target or config. The build\n"
- " build parameters will be taken for the build in the given <out_dir>.\n"
- "\n"
- " The <label or pattern> can be a target label, a config label, or a\n"
- " label pattern (see \"gn help label_pattern\"). A label pattern will\n"
- " only match targets.\n"
- "\n"
- "Possibilities for <what to show>\n"
- "\n"
- " (If unspecified an overall summary will be displayed.)\n"
- "\n"
- " all_dependent_configs\n"
- " allow_circular_includes_from\n"
- " arflags [--blame]\n"
- " args\n"
- " cflags [--blame]\n"
- " cflags_cc [--blame]\n"
- " cflags_cxx [--blame]\n"
- " check_includes\n"
- " configs [--tree] (see below)\n"
- " defines [--blame]\n"
- " depfile\n"
- " deps [--all] [--tree] (see below)\n"
- " include_dirs [--blame]\n"
- " inputs\n"
- " ldflags [--blame]\n"
- " lib_dirs\n"
- " libs\n"
- " outputs\n"
- " public_configs\n"
- " public\n"
- " script\n"
- " sources\n"
- " testonly\n"
- " visibility\n"
- "\n"
- " runtime_deps\n"
- " Compute all runtime deps for the given target. This is a\n"
- " computed list and does not correspond to any GN variable, unlike\n"
- " most other values here.\n"
- "\n"
- " The output is a list of file names relative to the build\n"
- " directory. See \"gn help runtime_deps\" for how this is computed.\n"
- " This also works with \"--blame\" to see the source of the\n"
- " dependency.\n"
- "\n"
- "Shared flags\n"
- "\n"
- ALL_TOOLCHAINS_SWITCH_HELP
- "\n"
- " --format=json\n"
- " Format the output as JSON instead of text.\n"
- "\n"
- "Target flags\n"
- "\n"
- " --blame\n"
- " Used with any value specified on a config, this will name\n"
- " the config that cause that target to get the flag. This doesn't\n"
- " currently work for libs and lib_dirs because those are inherited\n"
- " and are more complicated to figure out the blame (patches\n"
- " welcome).\n"
- "\n"
- "Configs\n"
- "\n"
- " The \"configs\" section will list all configs that apply. For targets\n"
- " this will include configs specified in the \"configs\" variable of\n"
- " the target, and also configs pushed onto this target via public\n"
- " or \"all dependent\" configs.\n"
- "\n"
- " Configs can have child configs. Specifying --tree will show the\n"
- " hierarchy.\n"
- "\n"
- "Printing outputs\n"
- "\n"
- " The \"outputs\" section will list all outputs that apply, including\n"
- " the outputs computed from the tool definition (eg for \"executable\",\n"
- " \"static_library\", ... targets).\n"
- "\n"
- "Printing deps\n"
- "\n"
- " Deps will include all public, private, and data deps (TODO this could\n"
- " be clarified and enhanced) sorted in order applying. The following\n"
- " may be used:\n"
- "\n"
- " --all\n"
- " Collects all recursive dependencies and prints a sorted flat list.\n"
- " Also usable with --tree (see below).\n"
- "\n"
+ R"(gn desc <out_dir> <label or pattern> [<what to show>] [--blame] "
+[--format=json]
+
+ Displays information about a given target or config. The build build
+ parameters will be taken for the build in the given <out_dir>.
+
+ The <label or pattern> can be a target label, a config label, or a label
+ pattern (see "gn help label_pattern"). A label pattern will only match
+ targets.
+
+Possibilities for <what to show>
+
+ (If unspecified an overall summary will be displayed.)
+
+ all_dependent_configs
+ allow_circular_includes_from
+ arflags [--blame]
+ args
+ cflags [--blame]
+ cflags_cc [--blame]
+ cflags_cxx [--blame]
+ check_includes
+ configs [--tree] (see below)
+ defines [--blame]
+ depfile
+ deps [--all] [--tree] (see below)
+ include_dirs [--blame]
+ inputs
+ ldflags [--blame]
+ lib_dirs
+ libs
+ outputs
+ public_configs
+ public
+ script
+ sources
+ testonly
+ visibility
+
+ runtime_deps
+ Compute all runtime deps for the given target. This is a computed list
+ and does not correspond to any GN variable, unlike most other values
+ here.
+
+ The output is a list of file names relative to the build directory. See
+ "gn help runtime_deps" for how this is computed. This also works with
+ "--blame" to see the source of the dependency.
+
+Shared flags
+)"
+
+ALL_TOOLCHAINS_SWITCH_HELP
+
+R"(
+ --format=json
+ Format the output as JSON instead of text.
+
+Target flags
+
+ --blame
+ Used with any value specified on a config, this will name the config that
+ cause that target to get the flag. This doesn't currently work for libs
+ and lib_dirs because those are inherited and are more complicated to
+ figure out the blame (patches welcome).
+
+Configs
+
+ The "configs" section will list all configs that apply. For targets this will
+ include configs specified in the "configs" variable of the target, and also
+ configs pushed onto this target via public or "all dependent" configs.
+
+ Configs can have child configs. Specifying --tree will show the hierarchy.
+
+Printing outputs
+
+ The "outputs" section will list all outputs that apply, including the outputs
+ computed from the tool definition (eg for "executable", "static_library", ...
+ targets).
+
+Printing deps
+
+ Deps will include all public, private, and data deps (TODO this could be
+ clarified and enhanced) sorted in order applying. The following may be used:
+
+ --all
+ Collects all recursive dependencies and prints a sorted flat list. Also
+ usable with --tree (see below).
+)"
+
TARGET_PRINTING_MODE_COMMAND_LINE_HELP
- "\n"
+"\n"
TARGET_TESTONLY_FILTER_COMMAND_LINE_HELP
- "\n"
- " --tree\n"
- " Print a dependency tree. By default, duplicates will be elided\n"
- " with \"...\" but when --all and -tree are used together, no\n"
- " eliding will be performed.\n"
- "\n"
- " The \"deps\", \"public_deps\", and \"data_deps\" will all be\n"
- " included in the tree.\n"
- "\n"
- " Tree output can not be used with the filtering or output flags:\n"
- " --as, --type, --testonly.\n"
- "\n"
- TARGET_TYPE_FILTER_COMMAND_LINE_HELP
- "\n"
- "Note\n"
- "\n"
- " This command will show the full name of directories and source files,\n"
- " but when directories and source paths are written to the build file,\n"
- " they will be adjusted to be relative to the build directory. So the\n"
- " values for paths displayed by this command won't match (but should\n"
- " mean the same thing).\n"
- "\n"
- "Examples\n"
- "\n"
- " gn desc out/Debug //base:base\n"
- " Summarizes the given target.\n"
- "\n"
- " gn desc out/Foo :base_unittests deps --tree\n"
- " Shows a dependency tree of the \"base_unittests\" project in\n"
- " the current directory.\n"
- "\n"
- " gn desc out/Debug //base defines --blame\n"
- " Shows defines set for the //base:base target, annotated by where\n"
- " each one was set from.\n";
+
+R"(
+ --tree
+ Print a dependency tree. By default, duplicates will be elided with "..."
+ but when --all and -tree are used together, no eliding will be performed.
+
+ The "deps", "public_deps", and "data_deps" will all be included in the
+ tree.
+
+ Tree output can not be used with the filtering or output flags: --as,
+ --type, --testonly.
+)"
+
+TARGET_TYPE_FILTER_COMMAND_LINE_HELP
+
+R"(Note
+
+ This command will show the full name of directories and source files, but
+ when directories and source paths are written to the build file, they will be
+ adjusted to be relative to the build directory. So the values for paths
+ displayed by this command won't match (but should mean the same thing).
+
+Examples
+
+ gn desc out/Debug //base:base
+ Summarizes the given target.
+
+ gn desc out/Foo :base_unittests deps --tree
+ Shows a dependency tree of the "base_unittests" project in
+ the current directory.
+
+ gn desc out/Debug //base defines --blame
+ Shows defines set for the //base:base target, annotated by where
+ each one was set from.
+)";
int RunDesc(const std::vector<std::string>& args) {
if (args.size() != 2 && args.size() != 3) {
« no previous file with comments | « tools/gn/command_check.cc ('k') | tools/gn/command_format.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698