|
|
@ -13,7 +13,8 @@ |
|
|
|
# limitations under the License. |
|
|
|
# limitations under the License. |
|
|
|
|
|
|
|
|
|
|
|
import pickle, os, uuid |
|
|
|
import pickle, os, uuid |
|
|
|
from .mesonlib import MesonException, default_libdir, default_libexecdir, default_prefix |
|
|
|
from .mesonlib import MesonException, commonpath |
|
|
|
|
|
|
|
from .mesonlib import default_libdir, default_libexecdir, default_prefix |
|
|
|
|
|
|
|
|
|
|
|
version = '0.38.1' |
|
|
|
version = '0.38.1' |
|
|
|
backendlist = ['ninja', 'vs2010', 'vs2015', 'xcode'] |
|
|
|
backendlist = ['ninja', 'vs2010', 'vs2015', 'xcode'] |
|
|
@ -158,7 +159,7 @@ class CoreData: |
|
|
|
if option.endswith('dir') and os.path.isabs(value) and \ |
|
|
|
if option.endswith('dir') and os.path.isabs(value) and \ |
|
|
|
option not in builtin_dir_noprefix_options: |
|
|
|
option not in builtin_dir_noprefix_options: |
|
|
|
# Value must be a subdir of the prefix |
|
|
|
# Value must be a subdir of the prefix |
|
|
|
if os.path.commonpath([value, prefix]) != prefix: |
|
|
|
if commonpath([value, prefix]) != prefix: |
|
|
|
m = 'The value of the {!r} option is {!r} which must be a ' \ |
|
|
|
m = 'The value of the {!r} option is {!r} which must be a ' \ |
|
|
|
'subdir of the prefix {!r}.\nNote that if you pass a ' \ |
|
|
|
'subdir of the prefix {!r}.\nNote that if you pass a ' \ |
|
|
|
'relative path, it is assumed to be a subdir of prefix.' |
|
|
|
'relative path, it is assumed to be a subdir of prefix.' |
|
|
@ -194,9 +195,9 @@ class CoreData: |
|
|
|
elif optname in self.builtins: |
|
|
|
elif optname in self.builtins: |
|
|
|
prefix = self.builtins['prefix'].value |
|
|
|
prefix = self.builtins['prefix'].value |
|
|
|
value = self.sanitize_dir_option_value(prefix, optname, value) |
|
|
|
value = self.sanitize_dir_option_value(prefix, optname, value) |
|
|
|
self.builtins[optname].set_value(value) |
|
|
|
|
|
|
|
else: |
|
|
|
else: |
|
|
|
raise RuntimeError('Tried to set unknown builtin option %s.' % optname) |
|
|
|
raise RuntimeError('Tried to set unknown builtin option %s.' % optname) |
|
|
|
|
|
|
|
self.builtins[optname].set_value(value) |
|
|
|
|
|
|
|
|
|
|
|
def load(filename): |
|
|
|
def load(filename): |
|
|
|
load_fail_msg = 'Coredata file {!r} is corrupted. Try with a fresh build tree.'.format(filename) |
|
|
|
load_fail_msg = 'Coredata file {!r} is corrupted. Try with a fresh build tree.'.format(filename) |
|
|
|