aboutsummaryrefslogtreecommitdiff
path: root/build2/target.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-05-19 09:18:29 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-05-19 09:18:29 +0200
commitbd3fb4a1324228b768bfa1f34ab4ce12539eb45b (patch)
treec8a0e6bd089c9ca9d87181d1945d71e3be54a5bb /build2/target.hxx
parent43a1c24b089ae92bcf9a80584ebdf4c4011b9664 (diff)
Add manifest{} target type ('manifest' file name automatically mapped as such)
Diffstat (limited to 'build2/target.hxx')
-rw-r--r--build2/target.hxx17
1 files changed, 15 insertions, 2 deletions
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.
//