aboutsummaryrefslogtreecommitdiff
path: root/build/target.txx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-12-01 15:37:04 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-12-01 15:37:04 +0200
commit74212589a797ca75e55f92a522e198915c0dbaf6 (patch)
tree6e16ed2ed816c66a0c3edef74c1f1e050fa0e272 /build/target.txx
parent10fd2aface4486fc7f873dd2b54a1c2073c0b434 (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.txx6
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