diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-10-26 11:15:18 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-11-01 10:28:43 +0200 |
commit | 50f9844b8a97aa06edf09b6d8a538721a0cd24ea (patch) | |
tree | 9d3d008e18a147355d0a6798ad5de3d0a45a7d42 /libbuild2/bin | |
parent | ded8aa661b013f325aaab7267cf6cc811d6d94cb (diff) |
Use match options for runtime/buildtime distinction when installing libraries
Specifically, now, if a library is installed solely as a prerequisite of
an executable (potentially recursively), then only its runtime files are
installed omitting everything buildtime-related (static/import libraries,
non-versioned symlinks for shared libraries, pkg-config files, headers,
etc). If you are familiar with the runtime and -dev/-devel package splits
for libraries in Debian/Fedora, this is an analogous semantics.
Diffstat (limited to 'libbuild2/bin')
-rw-r--r-- | libbuild2/bin/target.hxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libbuild2/bin/target.hxx b/libbuild2/bin/target.hxx index 9685e39..8f2a92e 100644 --- a/libbuild2/bin/target.hxx +++ b/libbuild2/bin/target.hxx @@ -412,6 +412,21 @@ namespace build2 virtual group_view group_members (action) const override; + // Match options for the install operation on the liba{}/libs{} and + // libua{}/libus{} target types (note: not lib{}/libul{} nor libue{}). + // + // If only install_runtime option is specified, then only install the + // runtime files omitting everything buildtime (headers, pkg-config + // files, shared library version-related symlinks, etc). + // + // Note that it's either runtime-only or runtime and buildtime (i.e., + // everything), so match with install_all instead of install_buildtime + // (the latter is only useful in the rule implementations). + // + static constexpr uint64_t option_install_runtime = 0x01; + static constexpr uint64_t option_install_buildtime = 0x02; + static constexpr uint64_t option_install_all = match_extra::all_options; + public: static const target_type static_type; }; |