Skip to content

Commit

Permalink
Fixes typos and stale documentation.
Browse files Browse the repository at this point in the history
to_build_path() doesn't exist anymore. Updated the doc to reference
rebase_path() instead.

R=brettw@chromium.org
BUG=

Review URL: https://codereview.chromium.org/151413007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248430 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
maruel@chromium.org committed Feb 2, 2014
1 parent d4dc6df commit f087232
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tools/gn/functions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ Value RunFunction(Scope* scope,
FunctionInfoMap::const_iterator found_function =
function_map.find(name.value());
if (found_function == function_map.end()) {
// No build-in function matching this, check for a template.
// No built-in function matching this, check for a template.
const FunctionCallNode* rule =
scope->GetTemplate(function->function().value().as_string());
if (rule) {
Expand Down
2 changes: 1 addition & 1 deletion tools/gn/source_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class SourceFile {
bool is_null() const { return value_.empty(); }
const std::string& value() const { return value_; }

// Returns everythign after the last slash.
// Returns everything after the last slash.
std::string GetName() const;
SourceDir GetDir() const;

Expand Down
16 changes: 9 additions & 7 deletions tools/gn/variables.cc
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ const char kRootGenDir_Help[] =
"\n"
" This is primarily useful for setting up include paths for generated\n"
" files. If you are passing this to a script, you will want to pass it\n"
" through to_build_path() (see \"gn help to_build_path\") to convert it\n"
" through rebase_path() (see \"gn help rebase_path\") to convert it\n"
" to be relative to the build directory.\n"
"\n"
" See also \"target_gen_dir\" which is usually a better location for\n"
Expand All @@ -173,7 +173,7 @@ const char kRootOutDir_Help[] =
"\n"
" This is primarily useful for setting up script calls. If you are\n"
" passing this to a script, you will want to pass it through\n"
" to_build_path() (see \"gn help to_build_path\") to convert it\n"
" rebase_path() (see \"gn help rebase_path\") to convert it\n"
" to be relative to the build directory.\n"
"\n"
" See also \"target_out_dir\" which is usually a better location for\n"
Expand All @@ -183,7 +183,7 @@ const char kRootOutDir_Help[] =
"\n"
" custom(\"myscript\") {\n"
" # Pass the output dir to the script.\n"
" args = [ \"-o\", to_build_path(root_out_dir) ]\n"
" args = [ \"-o\", rebase_path(root_out_dir, \".\", root_build_dir) ]\n"
" }\n";

const char kTargetGenDir[] = "target_gen_dir";
Expand All @@ -199,7 +199,7 @@ const char kTargetGenDir_Help[] =
"\n"
" This is primarily useful for setting up include paths for generated\n"
" files. If you are passing this to a script, you will want to pass it\n"
" through to_build_path() (see \"gn help to_build_path\") to convert it\n"
" through rebase_path() (see \"gn help rebase_path\") to convert it\n"
" to be relative to the build directory.\n"
"\n"
" See also \"gn help root_gen_dir\".\n"
Expand All @@ -208,7 +208,8 @@ const char kTargetGenDir_Help[] =
"\n"
" custom(\"myscript\") {\n"
" # Pass the generated output dir to the script.\n"
" args = [ \"-o\", to_build_path(target_gen_dir) ]\n"
" args = [ \"-o\", rebase_path(target_gen_dir, \".\", root_build_dir) ]"
"\n"
" }\n";

const char kTargetOutDir[] = "target_out_dir";
Expand All @@ -224,7 +225,7 @@ const char kTargetOutDir_Help[] =
"\n"
" This is primarily useful for setting up arguments for calling\n"
" scripts. If you are passing this to a script, you will want to pass it\n"
" through to_build_path() (see \"gn help to_build_path\") to convert it\n"
" through rebase_path() (see \"gn help rebase_path\") to convert it\n"
" to be relative to the build directory.\n"
"\n"
" See also \"gn help root_out_dir\".\n"
Expand All @@ -233,7 +234,8 @@ const char kTargetOutDir_Help[] =
"\n"
" custom(\"myscript\") {\n"
" # Pass the output dir to the script.\n"
" args = [ \"-o\", to_build_path(target_out_dir) ]\n"
" args = [ \"-o\", rebase_path(target_out_dir, \".\", root_build_dir) ]"
"\n"
" }\n";

// Target variables ------------------------------------------------------------
Expand Down

0 comments on commit f087232

Please sign in to comment.