aboutsummaryrefslogtreecommitdiff
path: root/build/target.txx
diff options
context:
space:
mode:
Diffstat (limited to 'build/target.txx')
-rw-r--r--build/target.txx8
1 files changed, 7 insertions, 1 deletions
diff --git a/build/target.txx b/build/target.txx
index 89a402e..a63994b 100644
--- a/build/target.txx
+++ b/build/target.txx
@@ -23,7 +23,13 @@ namespace build
// Include target type/pattern-specific variables.
//
if (auto l = s.lookup (tk, var))
- return extension_pool.find (as<string> (*l));
+ {
+ // Help the user here and strip leading '.' from the extension.
+ //
+ const string& e (as<string> (*l));
+ return extension_pool.find (
+ !e.empty () && e.front () == '.' ? string (e, 1) : e);
+ }
if (def != nullptr)
return extension_pool.find (def);