diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2021-06-23 01:00:59 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-23 01:00:59 +0300 |
commit | 6e0a0fd1da979acb25c1b0d7397e378d613953ba (patch) | |
tree | bbbfe309e7ee2987f3634e91a151891da0e057cd /mesonbuild/backend/backends.py | |
parent | 0e5f88baf4d08c98a8d140829dbe3f7db626ca8a (diff) | |
parent | 132420a05901deb8be5524c17fde7031d5d9b8a1 (diff) | |
download | meson-6e0a0fd1da979acb25c1b0d7397e378d613953ba.zip meson-6e0a0fd1da979acb25c1b0d7397e378d613953ba.tar.gz meson-6e0a0fd1da979acb25c1b0d7397e378d613953ba.tar.bz2 |
Merge pull request #8884 from dcbaker/submit/type-and-annotate-install-functions
Add annotations for the various install_* functions
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r-- | mesonbuild/backend/backends.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 2239fdd..4e470cf 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -42,9 +42,6 @@ if T.TYPE_CHECKING: from ..interpreter import Interpreter, Test from ..mesonlib import FileMode - InstallType = T.List[T.Tuple[str, str, T.Optional['FileMode']]] - InstallSubdirsType = T.List[T.Tuple[str, str, T.Optional['FileMode'], T.Tuple[T.Set[str], T.Set[str]]]] - # Languages that can mix with C or C++ but don't support unity builds yet # because the syntax we use for unity builds is specific to C/++/ObjC/++. # Assembly files cannot be unitified and neither can LLVM IR files @@ -1451,7 +1448,12 @@ class Backend: for h in headers: outdir = h.get_custom_install_dir() if outdir is None: - outdir = os.path.join(incroot, h.get_install_subdir()) + subdir = h.get_install_subdir() + if subdir is None: + outdir = incroot + else: + outdir = os.path.join(incroot, subdir) + for f in h.get_sources(): if not isinstance(f, File): raise MesonException(f'Invalid header type {f!r} can\'t be installed') |