diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2014-05-24 18:18:47 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2014-05-24 18:18:47 +0300 |
commit | 8467c5b0a66c699c8854579a75d87d4ffc269e51 (patch) | |
tree | 5016f141753b0e014a240fdf8f50a19db4cdd9a2 /build.py | |
parent | 0c853a7038eea5d1d23f4cf323d8afbfca29b723 (diff) | |
download | meson-8467c5b0a66c699c8854579a75d87d4ffc269e51.zip meson-8467c5b0a66c699c8854579a75d87d4ffc269e51.tar.gz meson-8467c5b0a66c699c8854579a75d87d4ffc269e51.tar.bz2 |
Can now generate GObject introspection data and install it.
Diffstat (limited to 'build.py')
-rw-r--r-- | build.py | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -569,10 +569,12 @@ class CustomTarget: self.subdir = subdir self.dependencies = [] self.process_kwargs(kwargs) - self.sources = [] self.extra_files = [] def process_kwargs(self, kwargs): + self.sources = kwargs.get('input', []) + if not isinstance(self.sources, list): + self.sources = [self.sources] if 'output' not in kwargs: raise InvalidArguments('Missing keyword argument "output".') self.output = kwargs['output'] @@ -598,6 +600,13 @@ class CustomTarget: elif isinstance(c, BuildTarget) or isinstance(c, CustomTarget): self.dependencies.append(c) final_cmd.append(os.path.join(c.get_subdir(), c.get_filename())) + elif isinstance(c, list): + # Hackety hack, only supports one level of flattening. Should really + # work to arbtrary depth. + for s in c: + if not isinstance(s, str): + raise InvalidArguments('Array as argument %d contains a non-string.' % i) + final_cmd.append(s) else: raise InvalidArguments('Argument %s in "command" is invalid.' % i) self.command = final_cmd |