aboutsummaryrefslogtreecommitdiff
path: root/build2/algorithm.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-06-26 16:06:54 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-06-26 16:06:54 +0200
commit4d1c02b736f4c1e827b11085cdc83ce4b46c03d1 (patch)
tree8d6a8318c23b1e9085d73c36843c90e875a52095 /build2/algorithm.cxx
parent70d00b9f7f3266c1962f6d5a6fc8de1866c67949 (diff)
Add notion of ad hoc group, use to handle DLL/import library
Diffstat (limited to 'build2/algorithm.cxx')
-rw-r--r--build2/algorithm.cxx23
1 files changed, 21 insertions, 2 deletions
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<file*> (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;
}