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

Side by Side Diff: tools/gn/docs/reference.md

Issue 2387763002: Support for source_target_relative expansion in GN (Closed)
Patch Set: Rebased Created 4 years 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
« no previous file with comments | « tools/gn/desc_builder.cc ('k') | tools/gn/function_process_file_template.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # GN Reference 1 # GN Reference
2 2
3 *This page is automatically generated from* `gn help --markdown all`. 3 *This page is automatically generated from* `gn help --markdown all`.
4 4
5 ## **\--args**: Specifies build arguments overrides. 5 ## **\--args**: Specifies build arguments overrides.
6 6
7 ``` 7 ```
8 See "gn help buildargs" for an overview of how build arguments work. 8 See "gn help buildargs" for an overview of how build arguments work.
9 9
10 Most operations take a build directory. The build arguments are taken from 10 Most operations take a build directory. The build arguments are taken from
(...skipping 6565 matching lines...) Expand 10 before | Expand all | Expand 10 after
6576 source file is in a different directory than the BUILD.gn file. 6576 source file is in a different directory than the BUILD.gn file.
6577 "//foo/bar/baz.txt" => "gen/foo/bar" 6577 "//foo/bar/baz.txt" => "gen/foo/bar"
6578 6578
6579 {{source_out_dir}} 6579 {{source_out_dir}}
6580 The object file directory (*) corresponding to the source file's path, 6580 The object file directory (*) corresponding to the source file's path,
6581 relative to the build directory. this us be different than the target's 6581 relative to the build directory. this us be different than the target's
6582 out directory if the source file is in a different directory than the 6582 out directory if the source file is in a different directory than the
6583 build.gn file. 6583 build.gn file.
6584 "//foo/bar/baz.txt" => "obj/foo/bar" 6584 "//foo/bar/baz.txt" => "obj/foo/bar"
6585 6585
6586 {{source_target_relative}}\n"
6587 The path to the source file relative to the target's directory. This will
6588 generally be used for replicating the source directory layout in the
6589 output directory. This can only be used in actions and it is an error to
6590 use in process_file_template where there is no "target".
6591 "//foo/bar/baz.txt" => "baz.txt"
6592
6586 ``` 6593 ```
6587 6594
6588 ### **(*) Note on directories** 6595 ### **(*) Note on directories**
6589 6596
6590 ``` 6597 ```
6591 Paths containing directories (except the source_root_relative_dir) will be 6598 Paths containing directories (except the source_root_relative_dir) will be
6592 different depending on what context the expansion is evaluated in. Generally 6599 different depending on what context the expansion is evaluated in. Generally
6593 it should "just work" but it means you can't concatenate strings containing 6600 it should "just work" but it means you can't concatenate strings containing
6594 these values with reasonable results. 6601 these values with reasonable results.
6595 6602
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
6644 ** \--root**: Explicitly specify source root. 6651 ** \--root**: Explicitly specify source root.
6645 ** \--runtime-deps-list-file**: Save runtime dependencies for targets in file. 6652 ** \--runtime-deps-list-file**: Save runtime dependencies for targets in file.
6646 ** \--script-executable**: Set the executable used to execute scripts. 6653 ** \--script-executable**: Set the executable used to execute scripts.
6647 ** \--threads**: Specify number of worker threads. 6654 ** \--threads**: Specify number of worker threads.
6648 ** \--time**: Outputs a summary of how long everything took. 6655 ** \--time**: Outputs a summary of how long everything took.
6649 ** \--tracelog**: Writes a Chrome-compatible trace log to the given file. 6656 ** \--tracelog**: Writes a Chrome-compatible trace log to the given file.
6650 ** -v**: Verbose logging. 6657 ** -v**: Verbose logging.
6651 ** \--version**: Prints the GN version number and exits. 6658 ** \--version**: Prints the GN version number and exits.
6652 6659
6653 ``` 6660 ```
OLDNEW
« no previous file with comments | « tools/gn/desc_builder.cc ('k') | tools/gn/function_process_file_template.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698