aboutsummaryrefslogtreecommitdiff
path: root/interpreter.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2014-01-18 23:11:59 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2014-01-18 23:11:59 +0200
commitab0cc277d19b46f06c5ce9eaaa8d79f9a03445ed (patch)
tree35a5fe2d3f3073021faccf951a5530056b82d7c5 /interpreter.py
parent4f0af86b52f201d097f0205ba2a024b1c66c6862 (diff)
downloadmeson-ab0cc277d19b46f06c5ce9eaaa8d79f9a03445ed.zip
meson-ab0cc277d19b46f06c5ce9eaaa8d79f9a03445ed.tar.gz
meson-ab0cc277d19b46f06c5ce9eaaa8d79f9a03445ed.tar.bz2
After an actual, factual bug report from a user, fixed include_directories so that it checks that the specified directories exist.
Diffstat (limited to 'interpreter.py')
-rw-r--r--interpreter.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/interpreter.py b/interpreter.py
index 402a185..bc5b3ab 100644
--- a/interpreter.py
+++ b/interpreter.py
@@ -1001,10 +1001,14 @@ class Interpreter():
conf.mark_used()
def func_include_directories(self, node, args, kwargs):
+ curdir = os.path.join(self.subproject, self.subdir)
+ absbase = os.path.join(self.environment.get_source_dir(), curdir)
for a in args:
if not isinstance(a, str):
raise InvalidArguments('Argument %s is not a string.' % str(a))
- curdir = os.path.join(self.subproject, self.subdir)
+ absdir = os.path.join(absbase, a)
+ if not os.path.isdir(absdir):
+ raise InvalidArguments('Include dir %s does not exist.' % a)
i = IncludeDirsHolder(curdir, args, kwargs)
return i