aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/coredata.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2016-02-17 23:22:25 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2016-02-17 23:22:25 +0200
commit25e39f7fb108e76b3058d408085178719c61e3ea (patch)
tree4583d917b877159a9cae2cde27a420fd7e5c019b /mesonbuild/coredata.py
parentaaf6075c89014c5213ca2b33b7669c3634e35e1a (diff)
downloadmeson-25e39f7fb108e76b3058d408085178719c61e3ea.zip
meson-25e39f7fb108e76b3058d408085178719c61e3ea.tar.gz
meson-25e39f7fb108e76b3058d408085178719c61e3ea.tar.bz2
A few win fixes.
Diffstat (limited to 'mesonbuild/coredata.py')
-rw-r--r--mesonbuild/coredata.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index 813d4ad..c12477f 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)