diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-12-03 18:04:13 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-12-03 18:04:13 +0200 |
commit | d109616006be29c4106966f77d0c0b22d51372ca (patch) | |
tree | ec98f199dcde5998317e3b38d79c4e82927744fe /build | |
parent | 9c45022422bc9826da36631bfe1184658956daaf (diff) |
Strip leading '.' from extension variable values
Diffstat (limited to 'build')
-rw-r--r-- | build/target.txx | 8 |
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); |