aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mesonmain.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-01-16 16:08:00 +0530
committerJussi Pakkanen <jpakkane@gmail.com>2017-01-23 20:34:45 +0200
commit23f3cec9d029b5d44fa7f6a109ab9cda948b12ba (patch)
tree4334fc2fc36c12766ddc5c005bfe20f3ed119599 /mesonbuild/mesonmain.py
parentf762e896d2891edc53058ffeb57d38ee2c1fb8db (diff)
downloadmeson-23f3cec9d029b5d44fa7f6a109ab9cda948b12ba.zip
meson-23f3cec9d029b5d44fa7f6a109ab9cda948b12ba.tar.gz
meson-23f3cec9d029b5d44fa7f6a109ab9cda948b12ba.tar.bz2
Force installation dir options to be inside prefix
With the exception of things like sysconfdir (/etc), every other installation directory option must be inside the prefix. Also move the prefix checks to coredata.py since prefix can also be set from inside project() with default_options and via mesonconf. Earlier you could set prefix to a relative path that way. This also allows us to return consistent values for get_option('xxxdir') regardless of whether relative paths are passed or absolute paths are passed while setting options on the command-line, via mesonconf, or via default_options in project(). Now the returned path will *always* be relative to the prefix. Includes a unit test for this, and a failing test. Closes #1299
Diffstat (limited to 'mesonbuild/mesonmain.py')
-rw-r--r--mesonbuild/mesonmain.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py
index 37b8055..031486c 100644
--- a/mesonbuild/mesonmain.py
+++ b/mesonbuild/mesonmain.py
@@ -73,15 +73,6 @@ class MesonApp:
def __init__(self, dir1, dir2, script_launcher, handshake, options, original_cmd_line_args):
(self.source_dir, self.build_dir) = self.validate_dirs(dir1, dir2, handshake)
- if not os.path.isabs(options.prefix):
- raise RuntimeError('--prefix value must be an absolute path: {!r}'.format(options.prefix))
- if options.prefix.endswith('/') or options.prefix.endswith('\\'):
- # On Windows we need to preserve the trailing slash if the
- # string is of type 'C:\' because 'C:' is not an absolute path.
- if len(options.prefix) == 3 and options.prefix[1] == ':':
- pass
- else:
- options.prefix = options.prefix[:-1]
self.meson_script_launcher = script_launcher
self.options = options
self.original_cmd_line_args = original_cmd_line_args