From ad720fabd468974e3909f62a0f4e4e3cf0d03aef Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 15 Apr 2015 11:59:58 +0200 Subject: Initial library support --- build/rule.cxx | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'build/rule.cxx') 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 (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; -- cgit v1.1