aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbuild2/bash/rule.cxx15
-rw-r--r--libbuild2/bash/rule.hxx2
2 files changed, 9 insertions, 8 deletions
diff --git a/libbuild2/bash/rule.cxx b/libbuild2/bash/rule.cxx
index 55f3cf0..2abddc3 100644
--- a/libbuild2/bash/rule.cxx
+++ b/libbuild2/bash/rule.cxx
@@ -63,16 +63,16 @@ namespace build2
// in_rule
//
bool in_rule::
- match (action a, target& t) const
+ match (action a, target& t, const string& hint, match_extra&) const
{
tracer trace ("bash::in_rule::match");
- // Note that for bash{} we match even if the target does not depend on
- // any modules (while it could have been handled by the in module, that
- // would require loading it).
+ // Note that for bash{} and for exe{} with hint we match even if the
+ // target does not depend on any modules (while it could have been
+ // handled by the in module, that would require loading it).
//
- bool fi (false); // Found in.
- bool fm (t.is_a<bash> ()); // Found module.
+ bool fi (false); // Found in.
+ bool fm (!hint.empty () || t.is_a<bash> ()); // Found module.
for (prerequisite_member p: group_prerequisite_members (a, t))
{
if (include (a, t, p) != include_type::normal) // Excluded/ad hoc.
@@ -86,7 +86,8 @@ namespace build2
l4 ([&]{trace << "no in file prerequisite for target " << t;});
if (!fm)
- l4 ([&]{trace << "no bash module prerequisite for target " << t;});
+ l4 ([&]{trace << "no bash module prerequisite or hint for target "
+ << t;});
return fi && fm;
}
diff --git a/libbuild2/bash/rule.hxx b/libbuild2/bash/rule.hxx
index 3da0c73..246ec4a 100644
--- a/libbuild2/bash/rule.hxx
+++ b/libbuild2/bash/rule.hxx
@@ -32,7 +32,7 @@ namespace build2
in_rule (): rule ("bash.in 1", "bash.in", '@', false /* strict */) {}
virtual bool
- match (action, target&) const override;
+ match (action, target&, const string&, match_extra&) const override;
virtual recipe
apply (action, target&) const override;