aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/build.py
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-02-15 16:00:12 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2021-02-22 23:03:55 +0200
commit2fabd4c7dc22373e99fc63823d80083ad30704b8 (patch)
treee2c9bf7d46812ee4e62e0289ea8cf3b6dc1801f6 /mesonbuild/build.py
parent36d9d7a96f6f42386b9dc3a18c152ccd4c8ca37b (diff)
downloadmeson-2fabd4c7dc22373e99fc63823d80083ad30704b8.zip
meson-2fabd4c7dc22373e99fc63823d80083ad30704b8.tar.gz
meson-2fabd4c7dc22373e99fc63823d80083ad30704b8.tar.bz2
minstall: Add --skip-subprojects option
By default all subprojects are installed. If --skip-subprojects is given with no value only the main project is installed. If --skip-subprojects is given with a value, it should be a coma separated list of subprojects to skip and all others will be installed. Fixes: #2550.
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r--mesonbuild/build.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index 9a4f8b1..de8d94b 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -127,11 +127,13 @@ class DependencyOverride:
class Headers:
def __init__(self, sources: T.List[File], install_subdir: T.Optional[str],
- install_dir: T.Optional[str], install_mode: T.Optional['FileMode']):
+ install_dir: T.Optional[str], install_mode: T.Optional['FileMode'],
+ subproject: str):
self.sources = sources
self.install_subdir = install_subdir
self.custom_install_dir = install_dir
self.custom_install_mode = install_mode
+ self.subproject = subproject
# TODO: we really don't need any of these methods, but they're preserved to
# keep APIs relying on them working.
@@ -155,10 +157,11 @@ class Headers:
class Man:
def __init__(self, sources: T.List[File], install_dir: T.Optional[str],
- install_mode: T.Optional['FileMode']):
+ install_mode: T.Optional['FileMode'], subproject: str):
self.sources = sources
self.custom_install_dir = install_dir
self.custom_install_mode = install_mode
+ self.subproject = subproject
def get_custom_install_dir(self) -> T.Optional[str]:
return self.custom_install_dir
@@ -175,7 +178,8 @@ class InstallDir:
def __init__(self, src_subdir: str, inst_subdir: str, install_dir: str,
install_mode: T.Optional['FileMode'],
exclude: T.Tuple[T.Set[str], T.Set[str]],
- strip_directory: bool, from_source_dir: bool = True):
+ strip_directory: bool, subproject: str,
+ from_source_dir: bool = True):
self.source_subdir = src_subdir
self.installable_subdir = inst_subdir
self.install_dir = install_dir
@@ -183,6 +187,7 @@ class InstallDir:
self.exclude = exclude
self.strip_directory = strip_directory
self.from_source_dir = from_source_dir
+ self.subproject = subproject
class Build:
@@ -2616,7 +2621,8 @@ class ConfigurationData:
# during install.
class Data:
def __init__(self, sources: T.List[File], install_dir: str,
- install_mode: T.Optional['FileMode'] = None, rename: T.List[str] = None):
+ install_mode: T.Optional['FileMode'], subproject: str,
+ rename: T.List[str] = None):
self.sources = sources
self.install_dir = install_dir
self.install_mode = install_mode
@@ -2624,6 +2630,7 @@ class Data:
self.rename = [os.path.basename(f.fname) for f in self.sources]
else:
self.rename = rename
+ self.subproject = subproject
class TestSetup:
def __init__(self, exe_wrapper: T.Optional[T.List[str]], gdb: bool,