diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-10-16 14:14:05 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2020-12-16 12:23:23 -0800 |
commit | 94b9e7b04ea4905a34dac2185ea58e561c3bf594 (patch) | |
tree | 5d919e7bb5bedf9778753b0fa0c4a02566e59c69 /mesonbuild/build.py | |
parent | 7ffc678514e6d86ba7072d726f0ccc99a0ccdbc5 (diff) | |
download | meson-94b9e7b04ea4905a34dac2185ea58e561c3bf594.zip meson-94b9e7b04ea4905a34dac2185ea58e561c3bf594.tar.gz meson-94b9e7b04ea4905a34dac2185ea58e561c3bf594.tar.bz2 |
build/interpreter: fix layering violations for ManPages
Like `install_headers`, `install_man` used the same objects for both the
interpreter and the build, this is bad. Let's have two separate objects.
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r-- | mesonbuild/build.py | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index ca1d86f..0f698b6 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -151,6 +151,24 @@ class Headers: return self.custom_install_mode +class Man: + + def __init__(self, sources: T.List[File], install_dir: T.Optional[str], + install_mode: T.Optional['FileMode']): + self.sources = sources + self.custom_install_dir = install_dir + self.custom_install_mode = install_mode + + def get_custom_install_dir(self) -> T.Optional[str]: + return self.custom_install_dir + + def get_custom_install_mode(self) -> T.Optional['FileMode']: + return self.custom_install_mode + + def get_sources(self) -> T.List['File']: + return self.sources + + class Build: """A class that holds the status of one build including all dependencies and so on. @@ -170,7 +188,7 @@ class Build: self.tests = [] # type: T.List['Test'] self.benchmarks = [] # type: T.List['Test'] self.headers: T.List[Headers] = [] - self.man = [] + self.man: T.List[Man] = [] self.data = [] self.static_linker = PerMachine(None, None) # type: PerMachine[StaticLinker] self.subprojects = {} |