From 4d1c02b736f4c1e827b11085cdc83ce4b46c03d1 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 26 Jun 2016 16:06:54 +0200 Subject: Add notion of ad hoc group, use to handle DLL/import library --- build2/algorithm.cxx | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'build2/algorithm.cxx') diff --git a/build2/algorithm.cxx b/build2/algorithm.cxx index 17768e3..02f3b8e 100644 --- a/build2/algorithm.cxx +++ b/build2/algorithm.cxx @@ -502,9 +502,28 @@ namespace build2 : target_state::unchanged); if (r == target_state::changed && ef.empty ()) - { ef = move (f); - } + + er |= r; + } + + // Now clean the ad hoc group file members, if any. + // + for (target* m (ft.member); m != nullptr; m = m->member) + { + file* fm (dynamic_cast (m)); + + if (fm == nullptr || fm->path ().empty ()) + continue; + + const path& f (fm->path ()); + + target_state r (rmfile (f, false) + ? target_state::changed + : target_state::unchanged); + + if (r == target_state::changed && ef.empty ()) + ef = f; er |= r; } -- cgit v1.1