aboutsummaryrefslogtreecommitdiff
path: root/interpreter.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-03-26 18:01:14 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2015-03-26 18:01:14 +0200
commit94bc5f40334a1339d611812fbd853bde45942135 (patch)
tree38e4be21b0b53e494d2742f4661e52eb87788572 /interpreter.py
parent4e097ec7026886f09a97b26e3c7fb619fae120f9 (diff)
downloadmeson-94bc5f40334a1339d611812fbd853bde45942135.zip
meson-94bc5f40334a1339d611812fbd853bde45942135.tar.gz
meson-94bc5f40334a1339d611812fbd853bde45942135.tar.bz2
Shameful hack to get configure files working with custom targets. Needs to be fixed properly during file object refactoring.
Diffstat (limited to 'interpreter.py')
-rw-r--r--interpreter.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/interpreter.py b/interpreter.py
index 832233f..d387542 100644
--- a/interpreter.py
+++ b/interpreter.py
@@ -1402,6 +1402,10 @@ class Interpreter():
raise InterpreterException('Required keyword argument "output" not defined.')
inputfile = kwargs['input']
output = kwargs['output']
+ if not isinstance(inputfile, str):
+ raise InterpreterException('Input must be a string.')
+ if not isinstance(output, str):
+ raise InterpreterException('Output must be a string.')
if 'configuration' in kwargs:
conf = kwargs['configuration']
if not isinstance(conf, ConfigurationDataHolder):
@@ -1421,6 +1425,12 @@ class Interpreter():
raise InterpreterException('Configure_file must have either "configuration" or "command".')
if isinstance(kwargs.get('install_dir', None), str):
self.build.data.append(Data(False, self.subdir, [output], kwargs))
+ # FIXME, HORROR, this is a massive hack to get this working. The correct
+ # solution is to finally do the refactoring where source files are no
+ # longer strings but actual objects. This is a major undertaking
+ # and will only be done after the next release.
+ outputfile = os.path.join(self.environment.build_dir, self.subdir, output)
+ return outputfile
def func_include_directories(self, node, args, kwargs):
absbase = os.path.join(self.environment.get_source_dir(), self.subdir)