diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-08-01 10:49:09 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-08-01 10:49:09 +0200 |
commit | a2cad68fe340a66ad54b93f88e39f97898fc462e (patch) | |
tree | be9033f82e650fe574d0149383121d700568247b /build2/bin | |
parent | a84ff43b183181e0a12c6d5e31c1f366d39ce2fe (diff) |
Reimplement pkg-config generation with more conservative approach for now
Diffstat (limited to 'build2/bin')
-rw-r--r-- | build2/bin/rule.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/build2/bin/rule.cxx b/build2/bin/rule.cxx index 7d32e26..bb9036b 100644 --- a/build2/bin/rule.cxx +++ b/build2/bin/rule.cxx @@ -38,7 +38,7 @@ namespace build2 // our prerequisites. // match_result lib_rule:: - match (action, target& xt, const string&) const + match (action act, target& xt, const string&) const { lib& t (xt.as<lib> ()); @@ -57,7 +57,15 @@ namespace build2 t.a = a ? &search<liba> (t, t.dir, t.out, t.name) : nullptr; t.s = s ? &search<libs> (t, t.dir, t.out, t.name) : nullptr; - return true; + match_result mr (true); + + // If there is an outer operation, indicate that we match + // unconditionally so that we don't override ourselves. + // + if (act.outer_operation () != 0) + mr.recipe_action = action (act.meta_operation (), act.operation ()); + + return mr; } recipe lib_rule:: |