diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-07-21 16:33:07 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-07-21 16:33:07 +0200 |
commit | 063b1a3c038ace6e1d9f8c49c04bf82dd9034828 (patch) | |
tree | 34ad2bcb78197256e6492332eb1b8187e02d81da /build2/bash/rule.cxx | |
parent | 77cf6f1cd3cdaa5c84ca191ad03d58b6355821fc (diff) |
Install bash module prerequisites for amalgamation rather than project
This is similar to what we do for shared libraries in cc::install_rule.
Diffstat (limited to 'build2/bash/rule.cxx')
-rw-r--r-- | build2/bash/rule.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/build2/bash/rule.cxx b/build2/bash/rule.cxx index 4266c89..d12e743 100644 --- a/build2/bash/rule.cxx +++ b/build2/bash/rule.cxx @@ -422,5 +422,20 @@ namespace build2 return r; } + + const target* install_rule:: + filter (action a, const target& t, const prerequisite& p) const + { + // If this is a module prerequisite, install it as long as it is in the + // same amalgamation as we are. + // + if (p.is_a<bash> ()) + { + const target& pt (search (t, p)); + return pt.in (t.weak_scope ()) ? &pt : nullptr; + } + else + return file_rule::filter (a, t, p); + } } } |