aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/target.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-04-28 08:48:53 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-05-27 15:47:28 +0200
commitb808c255b6a9ddba085bf5646e7d20ec344f2e2d (patch)
tree32730291f7e6de8ef0a227905520dd66fb4ec0f3 /libbuild2/target.cxx
parent3552356a87402727e663131994fa87f48b3cd4fb (diff)
Initial support for ad hoc recipes (still work in progress)
Diffstat (limited to 'libbuild2/target.cxx')
-rw-r--r--libbuild2/target.cxx14
1 files changed, 5 insertions, 9 deletions
diff --git a/libbuild2/target.cxx b/libbuild2/target.cxx
index 83ed4a5..b9cfea7 100644
--- a/libbuild2/target.cxx
+++ b/libbuild2/target.cxx
@@ -44,11 +44,9 @@ namespace build2
// target_key
//
- names target_key::
- as_name () const
+ void target_key::
+ as_name (names& r) const
{
- names r;
-
string v (*name);
target::combine_name (v, ext, false /* @@ TODO: what to do? */);
@@ -56,11 +54,9 @@ namespace build2
if (!out->empty ())
{
- r.front ().pair = '@';
+ r.back ().pair = '@';
r.push_back (build2::name (*out));
}
-
- return r;
}
// target_state
@@ -964,8 +960,8 @@ namespace build2
phase_switch ps (t.ctx, run_phase::load);
// This is subtle: while we were fussing around another thread may
- // have loaded the buildfile. So re-test now that we are in exclusive
- // phase.
+ // have loaded the buildfile. So re-test now that we are in an
+ // exclusive phase.
//
if (e == nullptr)
e = search_existing_target (t.ctx, pk);