aboutsummaryrefslogtreecommitdiff
path: root/build2/operation.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-08-01 10:49:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-08-01 10:49:09 +0200
commita2cad68fe340a66ad54b93f88e39f97898fc462e (patch)
treebe9033f82e650fe574d0149383121d700568247b /build2/operation.hxx
parenta84ff43b183181e0a12c6d5e31c1f366d39ce2fe (diff)
Reimplement pkg-config generation with more conservative approach for now
Diffstat (limited to 'build2/operation.hxx')
-rw-r--r--build2/operation.hxx17
1 files changed, 10 insertions, 7 deletions
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);