From df50091259a34fa4718f38c0e3b7b64f6e2469ac Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 15 Jan 2015 11:03:06 +0200 Subject: Implement rule ambiguity detection Also establish the infrastructure for rule hinting --- build/rule | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'build/rule') diff --git a/build/rule b/build/rule index 6bb58fe..91ef0ca 100644 --- a/build/rule +++ b/build/rule @@ -5,11 +5,13 @@ #ifndef BUILD_RULE #define BUILD_RULE +#include #include #include // reference_wrapper #include #include +#include namespace build { @@ -17,11 +19,12 @@ namespace build { public: virtual recipe - match (target&) const = 0; + match (target&, bool single, std::string& hint) const = 0; }; - typedef std::unordered_multimap> rule_map; + typedef std::unordered_map< + std::type_index, + prefix_multimap, '.'>> rule_map; extern rule_map rules; @@ -29,7 +32,7 @@ namespace build { public: virtual recipe - match (target&) const; + match (target&, bool single, std::string& hint) const; static target_state update (target&); -- cgit v1.1