From a2cad68fe340a66ad54b93f88e39f97898fc462e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 1 Aug 2017 10:49:09 +0200 Subject: Reimplement pkg-config generation with more conservative approach for now --- build2/operation.hxx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'build2/operation.hxx') diff --git a/build2/operation.hxx b/build2/operation.hxx index 08bcccf..06a6781 100644 --- a/build2/operation.hxx +++ b/build2/operation.hxx @@ -76,6 +76,15 @@ namespace build2 action_id outer_id; }; + inline bool + operator== (action x, action y) + { + return x.inner_id == y.inner_id && x.outer_id == y.outer_id; + } + + inline bool + operator!= (action x, action y) {return !(x == y);} + // This is an "overrides" comparison, i.e., it returns true if the recipe // for x overrides recipe for y. The idea is that for the same inner // operation, action with an outer operation is "weaker" than the one @@ -89,13 +98,7 @@ namespace build2 } inline bool - operator== (action x, action y) - { - return x.inner_id == y.inner_id && x.outer_id == y.outer_id; - } - - inline bool - operator!= (action x, action y) {return !(x == y);} + operator>= (action x, action y) {return x == y || x > y;} ostream& operator<< (ostream&, action); -- cgit v1.1