diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-12-01 15:37:04 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-12-01 15:37:04 +0200 |
commit | 74212589a797ca75e55f92a522e198915c0dbaf6 (patch) | |
tree | 6e16ed2ed816c66a0c3edef74c1f1e050fa0e272 /build/target.txx | |
parent | 10fd2aface4486fc7f873dd2b54a1c2073c0b434 (diff) |
Use 'extension' variable to resolve extension for file{}
We now also check target type/pattern-specific variables. So the new
usage is:
cli{*}: extension = cli
Diffstat (limited to 'build/target.txx')
-rw-r--r-- | build/target.txx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/build/target.txx b/build/target.txx index a293018..48bac21 100644 --- a/build/target.txx +++ b/build/target.txx @@ -20,12 +20,14 @@ namespace build const std::string& target_extension_var (const target_key& tk, scope& s) { - auto l (s[var]); + // Include target type/pattern-specific variables. + // + auto l (s.lookup (*tk.type, *tk.name, var)); if (!l) { diag_record dr; - dr << fail << "no default extension in variable " << var + dr << fail << "no default extension in variable '" << var << "'" << info << "required to derive file name for "; // This is a bit hacky: we may be dealing with a target (see |