From 25e39f7fb108e76b3058d408085178719c61e3ea Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Wed, 17 Feb 2016 23:22:25 +0200 Subject: [PATCH] A few win fixes. --- mesonbuild/backend/ninjabackend.py | 4 +++- mesonbuild/coredata.py | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index c0e204a60..f5c06dc84 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -1725,8 +1725,10 @@ rule FORTRAN_DEP_HACK pass try: os.symlink(basename, aliasfile) + except NotImplementedError: + mlog.debug("Library versioning disabled because symlinks are not supported.") except OSError: - mlog.debug("Library versioning disabled because we do not have symlink creation privileges") + mlog.debug("Library versioning disabled because we do not have symlink creation privileges.") def generate_gcov_clean(self, outfile): gcno_elem = NinjaBuildElement(self.all_outputs, 'clean-gcno', 'CUSTOM_COMMAND', 'PHONY') diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py index 813d4ad70..c12477fd6 100644 --- a/mesonbuild/coredata.py +++ b/mesonbuild/coredata.py @@ -61,8 +61,10 @@ class UserStringOption(UserOption): def validate(self, value): if not isinstance(value, str): raise MesonException('Value "%s" for string option "%s" is not a string.' % (str(newvalue), self.name)) - if self.name == 'prefix' and not os.path.isabs(value): - raise MesonException('Prefix option value \'{0}\' must be an absolute path.'.format(value)) + if self.name == 'prefix': + if not os.path.isabs(value): + if len(value) >= 2 and value[1] != ':': + raise MesonException('Prefix option value \'{0}\' must be an absolute path.'.format(value)) if self.name in ('libdir', 'bindir', 'includedir', 'datadir', 'mandir', 'localedir') \ and os.path.isabs(value): raise MesonException('Option %s must not be an absolute path.' % self.name)