diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2014-11-03 18:23:29 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2014-11-03 18:23:29 +0200 |
commit | 8313c4ed00499cc777f84609bb4916f9cf5142b6 (patch) | |
tree | fc2a2c7a56ba8b7785b141a4542cb70904bec3d4 /interpreter.py | |
parent | 10313fa3ebe72c92db0b4c84c79d83a838e8f99e (diff) | |
download | meson-8313c4ed00499cc777f84609bb4916f9cf5142b6.zip meson-8313c4ed00499cc777f84609bb4916f9cf5142b6.tar.gz meson-8313c4ed00499cc777f84609bb4916f9cf5142b6.tar.bz2 |
Use correct path when installing headers. Fixes #16.
Diffstat (limited to 'interpreter.py')
-rw-r--r-- | interpreter.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/interpreter.py b/interpreter.py index bd6421d..e49ff92 100644 --- a/interpreter.py +++ b/interpreter.py @@ -275,20 +275,24 @@ class IncludeDirsHolder(InterpreterObject): class Headers(InterpreterObject): - def __init__(self, sources, kwargs): + def __init__(self, src_subdir, sources, kwargs): InterpreterObject.__init__(self) self.sources = sources - self.subdir = kwargs.get('subdir', '') + self.source_subdir = src_subdir + self.install_subdir = kwargs.get('subdir', '') self.custom_install_dir = kwargs.get('install_dir', None) if self.custom_install_dir is not None: if not isinstance(self.custom_install_dir, str): raise InterpreterException('Custom_install_dir must be a string.') - def set_subdir(self, subdir): - self.subdir = subdir + def set_install_subdir(self, subdir): + self.install_subdir = subdir - def get_subdir(self): - return self.subdir + def get_install_subdir(self): + return self.install_subdir + + def get_source_subdir(self): + return self.source_subdir def get_sources(self): return self.sources @@ -1150,7 +1154,7 @@ class Interpreter(): for a in args: if not isinstance(a, str): raise InvalidArguments('Argument %s is not a string.' % str(a)) - h = Headers(args, kwargs) + h = Headers(self.subdir, args, kwargs) self.build.headers.append(h) return h |