diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-04-15 11:59:58 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-04-15 11:59:58 +0200 |
commit | ad720fabd468974e3909f62a0f4e4e3cf0d03aef (patch) | |
tree | 8c6b7d851e42a42118b28488a9a3def8e86cd849 /build/rule.cxx | |
parent | ace1743f7f78bb13f99553d6e97ad1beecf1ba99 (diff) |
Initial library support
Diffstat (limited to 'build/rule.cxx')
-rw-r--r-- | build/rule.cxx | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/build/rule.cxx b/build/rule.cxx index 413676b..884b28d 100644 --- a/build/rule.cxx +++ b/build/rule.cxx @@ -55,25 +55,14 @@ namespace build // path_target& pt (dynamic_cast<path_target&> (t)); + // Assign the path. While nromally we shouldn't do this in match(), + // no other rule should ever be ambiguous with the fallback one. + // if (pt.path ().empty ()) { - path p (t.dir / path (pt.name)); - - // @@ TMP: target name as an extension. - // - const string& e (pt.ext != nullptr ? *pt.ext : pt.type ().name); - - if (!e.empty ()) - { - p += '.'; - p += e; - } - - // While strictly speaking we shouldn't do this in match(), - // no other rule should ever be ambiguous with the fallback - // one. + // @@ TMP: using target name as the default extension. // - pt.path (move (p)); + pt.path (pt.derived_path (pt.type ().name)); } return pt.mtime () != timestamp_nonexistent ? &t : nullptr; |