From 49d5628e35593a5300d39596286c768d7aa435b6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 7 Jul 2015 09:18:22 +0200 Subject: Rework module architecture Now the target type and rule maps are in scopes (builtins -- in global scope). We also now have the map of loaded modules in the root scope of each project. --- build/target | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) (limited to 'build/target') diff --git a/build/target b/build/target index 4131338..954604c 100644 --- a/build/target +++ b/build/target @@ -10,19 +10,20 @@ #include #include // unique_ptr #include // size_t -#include // function, reference_wrapper +#include // reference_wrapper #include #include #include // move(), forward(), declval() #include #include -#include // compare_c_string, reverse_iterate() +#include // reverse_iterate() #include // map_iterator_adapter #include #include #include +#include #include #include @@ -756,31 +757,6 @@ namespace build extern target_set targets; - using target_type_map_base = std::map< - const char*, - std::reference_wrapper, - butl::compare_c_string>; - - class target_type_map: public target_type_map_base - { - public: - void - insert (const target_type& tt) {emplace (tt.name, tt);} - - using target_type_map_base::find; - - // Given a name, figure out its type, taking into account extensions, - // special names (e.g., '.' and '..'), or anything else that might be - // relevant. Also process the name (in place) by extracting the - // extension, adjusting dir/value, etc (note that the dir is not - // necessarily normalized). Return NULL if not found. - // - const target_type* - find (name&, const std::string*& ext) const; - }; - - extern target_type_map target_types; - // Modification time-based target. // class mtime_target: public target -- cgit v1.1