| 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 "tools/gn/substitution_writer.h" | 5 #include "tools/gn/substitution_writer.h" |
| 6 | 6 |
| 7 #include "tools/gn/build_settings.h" | 7 #include "tools/gn/build_settings.h" |
| 8 #include "tools/gn/escape.h" | 8 #include "tools/gn/escape.h" |
| 9 #include "tools/gn/filesystem_utils.h" | 9 #include "tools/gn/filesystem_utils.h" |
| 10 #include "tools/gn/output_file.h" | 10 #include "tools/gn/output_file.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 source file is in a different directory than the BUILD.gn file. | 91 source file is in a different directory than the BUILD.gn file. |
| 92 "//foo/bar/baz.txt" => "gen/foo/bar" | 92 "//foo/bar/baz.txt" => "gen/foo/bar" |
| 93 | 93 |
| 94 {{source_out_dir}} | 94 {{source_out_dir}} |
| 95 The object file directory (*) corresponding to the source file's path, | 95 The object file directory (*) corresponding to the source file's path, |
| 96 relative to the build directory. this us be different than the target's | 96 relative to the build directory. this us be different than the target's |
| 97 out directory if the source file is in a different directory than the | 97 out directory if the source file is in a different directory than the |
| 98 build.gn file. | 98 build.gn file. |
| 99 "//foo/bar/baz.txt" => "obj/foo/bar" | 99 "//foo/bar/baz.txt" => "obj/foo/bar" |
| 100 | 100 |
| 101 {{source_target_relative}}\n" | 101 {{source_target_relative}} |
| 102 The path to the source file relative to the target's directory. This will | 102 The path to the source file relative to the target's directory. This will |
| 103 generally be used for replicating the source directory layout in the | 103 generally be used for replicating the source directory layout in the |
| 104 output directory. This can only be used in actions and it is an error to | 104 output directory. This can only be used in actions and it is an error to |
| 105 use in process_file_template where there is no "target". | 105 use in process_file_template where there is no "target". |
| 106 "//foo/bar/baz.txt" => "baz.txt" | 106 "//foo/bar/baz.txt" => "baz.txt" |
| 107 | 107 |
| 108 (*) Note on directories | 108 (*) Note on directories |
| 109 | 109 |
| 110 Paths containing directories (except the source_root_relative_dir) will be | 110 Paths containing directories (except the source_root_relative_dir) will be |
| 111 different depending on what context the expansion is evaluated in. Generally | 111 different depending on what context the expansion is evaluated in. Generally |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 return tool->default_output_extension(); | 601 return tool->default_output_extension(); |
| 602 if (target->output_extension().empty()) | 602 if (target->output_extension().empty()) |
| 603 return std::string(); // Explicitly set to no extension. | 603 return std::string(); // Explicitly set to no extension. |
| 604 return std::string(".") + target->output_extension(); | 604 return std::string(".") + target->output_extension(); |
| 605 | 605 |
| 606 default: | 606 default: |
| 607 NOTREACHED(); | 607 NOTREACHED(); |
| 608 return std::string(); | 608 return std::string(); |
| 609 } | 609 } |
| 610 } | 610 } |
| OLD | NEW |