aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/target.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-06-29 08:45:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-06-29 08:45:09 +0200
commit7daa7916182025d737f439da5fe5d67fe1a2fb8c (patch)
tree7604da6f22d2262dbdddd60053cc897dc5b478b3 /libbuild2/target.hxx
parentd1d28c5f261e39013b8b987d58b3c0acaa8c762b (diff)
Add legal{} target type and config.install.legal variable
This allows separation of legal files (LICENSE, AUTHORS, etc) from other documentation. For example: ./: ... doc{README} legal{LICENSE} $ b install ... config.install.legal=/usr/share/licenses/hello/
Diffstat (limited to 'libbuild2/target.hxx')
-rw-r--r--libbuild2/target.hxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/libbuild2/target.hxx b/libbuild2/target.hxx
index d4b287b..a97097f 100644
--- a/libbuild2/target.hxx
+++ b/libbuild2/target.hxx
@@ -1756,7 +1756,7 @@ namespace build2
virtual const target_type& dynamic_type () const {return static_type;}
};
- // Common documentation file targets.
+ // Common documentation file target.
//
class LIBBUILD2_SYMEXPORT doc: public file
{
@@ -1768,6 +1768,18 @@ namespace build2
virtual const target_type& dynamic_type () const {return static_type;}
};
+ // Legal files (LICENSE, AUTHORS, COPYRIGHT, etc).
+ //
+ class LIBBUILD2_SYMEXPORT legal: public doc
+ {
+ public:
+ using doc::doc;
+
+ public:
+ static const target_type static_type;
+ virtual const target_type& dynamic_type () const {return static_type;}
+ };
+
// The problem with man pages is this: different platforms have
// different sets of sections. What seems to be the "sane" set
// is 1-9 (Linux and BSDs). SysV (e.g., Solaris) instead maps