aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2014-08-12 23:25:52 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2014-08-12 23:25:52 +0300
commitef788a31ce84e4b612e0d7ce51f5d178d60308a4 (patch)
treeec52be0f552a8c66b2c8c3b491f82cbc2a7fc23a
parent8f5a51f0c7bc1cfb0647ee4f469444a22c53e72e (diff)
downloadmeson-ef788a31ce84e4b612e0d7ce51f5d178d60308a4.zip
meson-ef788a31ce84e4b612e0d7ce51f5d178d60308a4.tar.gz
meson-ef788a31ce84e4b612e0d7ce51f5d178d60308a4.tar.bz2
Can set headers() with variables.
-rw-r--r--interpreter.py1
-rw-r--r--test cases/common/9 header install/meson.build4
2 files changed, 4 insertions, 1 deletions
diff --git a/interpreter.py b/interpreter.py
index 167e428..1d6a132 100644
--- a/interpreter.py
+++ b/interpreter.py
@@ -1136,6 +1136,7 @@ class Interpreter():
mlog.debug('Adding test "', mlog.bold(args[0]), '".', sep='')
def func_headers(self, node, args, kwargs):
+ args = self.flatten(args)
for a in args:
if not isinstance(a, str):
raise InvalidArguments('Argument %s is not a string.' % str(a))
diff --git a/test cases/common/9 header install/meson.build b/test cases/common/9 header install/meson.build
index 6e54489..b5388ae 100644
--- a/test cases/common/9 header install/meson.build
+++ b/test cases/common/9 header install/meson.build
@@ -1,4 +1,6 @@
project('header install', 'c')
+as_array = ['subdir.h']
+
h1 = headers('rootdir.h')
-h2 = headers('subdir.h', subdir : 'subdir')
+h2 = headers(as_array, subdir : 'subdir')