aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2016-02-17 19:58:39 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2016-02-17 19:58:39 +0200
commit31fc897496dc1759c3fd3db38bd4ab2b082d5a67 (patch)
treee416047eb6da0dd83ea33110849474ccac40885b
parent3dd039487ed80fe9cb354e38602ed5b3aefc51be (diff)
parent8bd0f432a069b9e54a6aaf64c3457bc882655a55 (diff)
downloadmeson-31fc897496dc1759c3fd3db38bd4ab2b082d5a67.zip
meson-31fc897496dc1759c3fd3db38bd4ab2b082d5a67.tar.gz
meson-31fc897496dc1759c3fd3db38bd4ab2b082d5a67.tar.bz2
Merge pull request #391 from nirbheek/minor-changes
Bunch of minor changes
-rw-r--r--mesonbuild/backend/backends.py4
-rw-r--r--mesonbuild/coredata.py2
-rw-r--r--mesonbuild/mesonmain.py2
3 files changed, 5 insertions, 3 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index cab3b8f..d66418c 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -83,7 +83,9 @@ class Backend():
targetdir = self.get_target_dir(target)
fname = target.get_filename()
if isinstance(fname, list):
- fname = fname[0] # HORROR, HORROR! Fix this.
+ # FIXME FIXME FIXME: build.CustomTarget has multiple output files
+ # and get_filename() returns them all
+ fname = fname[0]
filename = os.path.join(targetdir, fname)
return filename
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index 72e3414..813d4ad 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -62,7 +62,7 @@ class UserStringOption(UserOption):
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 must be an absolute path.')
+ 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)
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py
index 2686818..5379955 100644
--- a/mesonbuild/mesonmain.py
+++ b/mesonbuild/mesonmain.py
@@ -82,7 +82,7 @@ class MesonApp():
def __init__(self, dir1, dir2, script_file, handshake, options):
(self.source_dir, self.build_dir) = self.validate_dirs(dir1, dir2, handshake)
if not os.path.isabs(options.prefix):
- raise RuntimeError('--prefix must be an absolute path.')
+ raise RuntimeError('--prefix value \'{0}\' must be an absolute path: '.format(options.prefix))
if options.prefix.endswith('/') or options.prefix.endswith('\\'):
options.prefix = options.prefix[:-1]
self.meson_script_file = script_file