aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreterbase.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2020-03-01 18:17:41 +0200
committerGitHub <noreply@github.com>2020-03-01 18:17:41 +0200
commit25cbcb19a9208ebf8f5cde3f8ecb91df0a2dfebf (patch)
treecf29f0c60ac4014b9395edbe2a9c3efdad449291 /mesonbuild/interpreterbase.py
parent74452f2a1c842291c893504876507946103ac77f (diff)
parent96f661e15046a4222fd01a7216e18de901b73cb6 (diff)
downloadmeson-25cbcb19a9208ebf8f5cde3f8ecb91df0a2dfebf.zip
meson-25cbcb19a9208ebf8f5cde3f8ecb91df0a2dfebf.tar.gz
meson-25cbcb19a9208ebf8f5cde3f8ecb91df0a2dfebf.tar.bz2
Merge pull request #6627 from jon-turney/cwd-relative-file-locations
Consistently report file locations relative to cwd
Diffstat (limited to 'mesonbuild/interpreterbase.py')
-rw-r--r--mesonbuild/interpreterbase.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/interpreterbase.py b/mesonbuild/interpreterbase.py
index 2a976d3..d723da5 100644
--- a/mesonbuild/interpreterbase.py
+++ b/mesonbuild/interpreterbase.py
@@ -381,7 +381,7 @@ class InterpreterBase:
raise InvalidCode('Builder file is empty.')
assert(isinstance(code, str))
try:
- self.ast = mparser.Parser(code, self.subdir).parse()
+ self.ast = mparser.Parser(code, mesonfile).parse()
except mesonlib.MesonException as me:
me.file = mesonfile
raise me
@@ -432,7 +432,7 @@ class InterpreterBase:
if not hasattr(e, 'lineno'):
e.lineno = cur.lineno
e.colno = cur.colno
- e.file = os.path.join(self.subdir, 'meson.build')
+ e.file = os.path.join(self.source_root, self.subdir, environment.build_filename)
raise e
i += 1 # In THE FUTURE jump over blocks and stuff.