From 74212589a797ca75e55f92a522e198915c0dbaf6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 1 Dec 2015 15:37:04 +0200 Subject: 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 --- build/target.txx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'build/target.txx') 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 -- cgit v1.1