aboutsummaryrefslogtreecommitdiff
path: root/interpreter.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-10-03 23:18:40 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-10-03 23:18:40 +0300
commita9ec9ba104b78f657482846b84dae39385ab08de (patch)
tree15cbc2a15f6077f448bea5f21eacbd6d54291d3e /interpreter.py
parent7bb28ef3c87f4f19daf83f4f564d9e3338eff10a (diff)
downloadmeson-a9ec9ba104b78f657482846b84dae39385ab08de.zip
meson-a9ec9ba104b78f657482846b84dae39385ab08de.tar.gz
meson-a9ec9ba104b78f657482846b84dae39385ab08de.tar.bz2
Basic outline for exposing private dir. Not working fully yet.
Diffstat (limited to 'interpreter.py')
-rw-r--r--interpreter.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/interpreter.py b/interpreter.py
index edfe59b..9885932 100644
--- a/interpreter.py
+++ b/interpreter.py
@@ -355,9 +355,9 @@ class CrossMachineInfo(InterpreterObject):
return self.info['endian']
class IncludeDirsHolder(InterpreterObject):
- def __init__(self, curdir, dirs):
+ def __init__(self, idobj):
super().__init__()
- self.held_object = build.IncludeDirs(curdir, dirs)
+ self.held_object = idobj
class Headers(InterpreterObject):
@@ -459,11 +459,16 @@ class BuildTargetHolder(InterpreterObject):
'extract_all_objects' : self.extract_all_objects_method,
'get_id': self.get_id_method,
'outdir' : self.outdir_method,
+ 'private_dir_include' : self.private_dir_include_method,
})
def is_cross(self):
return self.held_object.is_cross()
+ def private_dir_include_method(self, args, kwargs):
+ return IncludeDirsHolder(build.IncludeDirs('', [],
+ [self.interpreter.backend.get_target_private_dir(self.held_object)]))
+
def outdir_method(self, args, kwargs):
return self.interpreter.backend.get_target_dir(self.held_object)
@@ -1644,7 +1649,7 @@ class Interpreter():
absdir = os.path.join(absbase, a)
if not os.path.isdir(absdir):
raise InvalidArguments('Include dir %s does not exist.' % a)
- i = IncludeDirsHolder(self.subdir, args)
+ i = IncludeDirsHolder(build.IncludeDirs(self.subdir, args))
return i
@stringArgs