From 7daa7916182025d737f439da5fe5d67fe1a2fb8c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 29 Jun 2020 08:45:09 +0200 Subject: 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/ --- libbuild2/target.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libbuild2/target.cxx') diff --git a/libbuild2/target.cxx b/libbuild2/target.cxx index a543f34..232b0b1 100644 --- a/libbuild2/target.cxx +++ b/libbuild2/target.cxx @@ -1239,6 +1239,19 @@ namespace build2 false }; + const target_type legal::static_type + { + "legal", + &doc::static_type, + &target_factory, + &target_extension_fix, // Same as file (no extension). + nullptr, /* default_extension */ + nullptr, /* pattern */ // Same as file. + &target_print_1_ext_verb, // Same as file. + &file_search, + false + }; + static const char* man_extension (const target_key& tk, const scope*) { -- cgit v1.1