diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-08-01 23:51:43 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-08-22 14:15:22 -0400 |
commit | 3e73d4d77d1d36b15d06c8b3c4a7ee6ad77847b6 (patch) | |
tree | 1657528ecf739758e226827e9e8f3eae1d3419c5 /mesonbuild/build.py | |
parent | e19e9ce6f196f7c127a2668b5df0ada1d50806df (diff) | |
download | meson-3e73d4d77d1d36b15d06c8b3c4a7ee6ad77847b6.zip meson-3e73d4d77d1d36b15d06c8b3c4a7ee6ad77847b6.tar.gz meson-3e73d4d77d1d36b15d06c8b3c4a7ee6ad77847b6.tar.bz2 |
introspection: untangle install_plan implemetation, fix a bunch of wrong ones
Generally plumb through the values of get_option() passed to
install_dir, and use this to establish the install plan name. Fixes
several odd cases, such as:
- {datadir} being prepended to "share" or "include"
- dissociating custom install directories and writing them out as
{prefix}/share/foo or {prefix}/lib/python3.10/site-packages
This is the second half of #9478
Fixes #10601
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r-- | mesonbuild/build.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 2729373..c7f5997 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -628,7 +628,7 @@ class Target(HoldableObject): # False (which means we want this specific output out of many # outputs to not be installed). custom_install_dir = True - default_install_dir_name = None + install_dir_names = [getattr(i, 'optname', None) for i in outdirs] else: custom_install_dir = False # if outdirs is empty we need to set to something, otherwise we set @@ -637,8 +637,9 @@ class Target(HoldableObject): outdirs[0] = default_install_dir else: outdirs = [default_install_dir] + install_dir_names = [default_install_dir_name] * len(outdirs) - return outdirs, default_install_dir_name, custom_install_dir + return outdirs, install_dir_names, custom_install_dir def get_basename(self) -> str: return self.name |