aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
authorFilipe Brandenburger <filbranden@google.com>2018-03-09 10:38:02 -0800
committerFilipe Brandenburger <filbranden@google.com>2018-04-18 11:44:54 -0700
commit8651d55c6a317de37dcaa9965157151095a88292 (patch)
tree4bb43f0f3b079df0e6a4653725e91c57be3adea8 /mesonbuild/backend/backends.py
parenta52543cd1eb196da582191b8d89b397037c31301 (diff)
downloadmeson-8651d55c6a317de37dcaa9965157151095a88292.zip
meson-8651d55c6a317de37dcaa9965157151095a88292.tar.gz
meson-8651d55c6a317de37dcaa9965157151095a88292.tar.bz2
Add new builtin option --install-umask
This option controls the permissions of installed files (except for those specified explicitly using install_mode option, e.g. in install_data rules.) An install-umask of 022 will install all binaries, directories and executable files with mode rwxr-xr-x, while all data and non-executable files will be installed with mode rw-r--r--. Setting install-umask to the string 'preserve' will disable this feature, keeping the permissions of installed files same as the files in the build tree (or source tree for install_data and install_subdir.) Note that, in this case, the umask used when building and that used when checking out the source tree will leak into the install tree. Keep the default as 'preserve', to show that no behavior is changed and all tests keep passing unchanged. Tested: ./run_tests.py
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r--mesonbuild/backend/backends.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 8f75dac..bc7c295 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -37,11 +37,13 @@ class CleanTrees:
self.trees = trees
class InstallData:
- def __init__(self, source_dir, build_dir, prefix, strip_bin, mesonintrospect):
+ def __init__(self, source_dir, build_dir, prefix, strip_bin,
+ install_umask, mesonintrospect):
self.source_dir = source_dir
self.build_dir = build_dir
self.prefix = prefix
self.strip_bin = strip_bin
+ self.install_umask = install_umask
self.targets = []
self.headers = []
self.man = []