From bd3fb4a1324228b768bfa1f34ab4ce12539eb45b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 19 May 2018 09:18:29 +0200 Subject: Add manifest{} target type ('manifest' file name automatically mapped as such) --- build2/target.hxx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'build2/target.hxx') diff --git a/build2/target.hxx b/build2/target.hxx index 2f32064..05a748c 100644 --- a/build2/target.hxx +++ b/build2/target.hxx @@ -1626,8 +1626,6 @@ namespace build2 // Common documentation file targets. // - // @@ Maybe these should be in the built-in doc module? - // class doc: public file { public: @@ -1692,6 +1690,21 @@ namespace build2 virtual const target_type& dynamic_type () const {return static_type;} }; + // We derive manifest from doc rather than file so that it get automatically + // installed into the same place where the rest of the documentation goes. + // If you think about it, it's kind of a documentation, similar to (but + // better than) the version file that many projects come with. + // + class manifest: public doc + { + public: + using doc::doc; + + public: + static const target_type static_type; + virtual const target_type& dynamic_type () const {return static_type;} + }; + // Common implementation of the target factory, extension, and search // functions. // -- cgit v1.1