diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 21f90661fd74..a860b272bd44 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -1854,7 +1854,10 @@ def generate_man_install(self, d: InstallData) -> None: srcabs = f.absolute_path(self.environment.get_source_dir(), self.environment.get_build_dir()) dstname = os.path.join(subdir, os.path.basename(fname)) dstabs = dstname.replace('{mandir}', manroot) - i = InstallDataBase(srcabs, dstabs, dstname, m.get_custom_install_mode(), m.subproject, tag='man') + tag = 'man' + if m.install_tag is not None: + tag = m.install_tag + i = InstallDataBase(srcabs, dstabs, dstname, m.get_custom_install_mode(), m.subproject, tag=tag) d.man.append(i) def generate_emptydir_install(self, d: InstallData) -> None: diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 0822f6a2bfd1..66d635fa3ad7 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -271,6 +271,7 @@ class Man(HoldableObject): custom_install_mode: 'FileMode' subproject: str locale: T.Optional[str] + install_tag: T.Optional[str] = None def get_custom_install_dir(self) -> T.Optional[str]: return self.custom_install_dir diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index 3b87f48eae44..1aeb94288c9b 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -2341,6 +2341,7 @@ def func_install_headers(self, node: mparser.BaseNode, KwargInfo('locale', (str, NoneType), since='0.58.0'), INSTALL_MODE_KW.evolve(since='0.47.0'), INSTALL_DIR_KW, + INSTALL_TAG_KW.evolve(since='1.11.0') ) def func_install_man(self, node: mparser.BaseNode, args: T.Tuple[T.List['mesonlib.FileOrString']], @@ -2358,7 +2359,7 @@ def func_install_man(self, node: mparser.BaseNode, raise InvalidArguments('Man file must have a file extension of a number between 1 and 9') m = build.Man(sources, kwargs['install_dir'], install_mode, - self.subproject, kwargs['locale']) + self.subproject, kwargs['locale'], kwargs['install_tag']) self.build.man.append(m) return m