It used to support: - a single string - an array of anything And as long as CustomTarget supported it too, everything worked fine. So, a `files('foo')` worked but a `files('foo')[0]` did not, which is silly... and it's not exactly terrible to use files() here, the input is literally a list of source files. Fixes building gnome-terminal Fixes #9827 Test updated by Nirbheek Chauhan <nirbheek@centricular.com>pull/9833/head
parent
f3a8e5d3b2
commit
96d0005744
5 changed files with 64 additions and 21 deletions
@ -1,7 +1,7 @@ |
||||
#include<stdio.h> |
||||
#include<stdlib.h> |
||||
#include<glib-object.h> |
||||
#include"marshaller.h" |
||||
#include <stdio.h> |
||||
#include <stdlib.h> |
||||
#include <glib-object.h> |
||||
#include @MARSHALLER_HEADER@ |
||||
|
||||
static int singleton = 42; |
||||
|
@ -1,12 +1,51 @@ |
||||
marshallers = gnome.genmarshal('marshaller', |
||||
sources : 'marshaller.list', |
||||
install_header : true, |
||||
install_dir : get_option('includedir'), |
||||
extra_args : ['-UG_ENABLE_DEBUG', '--prototypes']) |
||||
|
||||
marshaller_c = marshallers[0] |
||||
marshaller_h = marshallers[1] |
||||
|
||||
genmarshalexe = executable('genmarshalprog', 'main.c', marshaller_c, marshaller_h, |
||||
dependencies : gobj) |
||||
test('genmarshal test', genmarshalexe) |
||||
m_list = configure_file(input: 'marshaller.list', |
||||
output: 'm.list', |
||||
copy: true) |
||||
|
||||
idx = 0 |
||||
mlists = ['marshaller.list', files('marshaller.list'), m_list] |
||||
|
||||
foreach mlist : mlists |
||||
marshallers = gnome.genmarshal('marshaller-@0@'.format(idx), |
||||
sources : mlist, |
||||
install_header : true, |
||||
install_dir : get_option('includedir') / 'subdir-@0@'.format(idx), |
||||
extra_args : ['-UG_ENABLE_DEBUG', '--prototypes']) |
||||
|
||||
marshaller_c = marshallers[0] |
||||
marshaller_h = marshallers[1] |
||||
|
||||
cdata = configuration_data() |
||||
cdata.set_quoted('MARSHALLER_HEADER', 'marshaller-@0@.h'.format(idx)) |
||||
|
||||
main_c = configure_file(input: 'main.c.in', |
||||
output: 'main-@0@.c'.format(idx), |
||||
configuration: cdata) |
||||
|
||||
genmarshalexe = executable('genmarshalprog-@0@'.format(idx), |
||||
main_c, marshaller_c, marshaller_h, |
||||
dependencies : gobj) |
||||
test('genmarshal test @0@'.format(idx), genmarshalexe) |
||||
idx += 1 |
||||
endforeach |
||||
|
||||
foreach mlist : mlists |
||||
marshallers = gnome.genmarshal('marshaller-@0@'.format(idx), |
||||
sources : [mlist], |
||||
install_header : true, |
||||
install_dir : get_option('includedir') / 'subdir-@0@'.format(idx), |
||||
extra_args : ['-UG_ENABLE_DEBUG', '--prototypes']) |
||||
|
||||
marshaller_c = marshallers[0] |
||||
marshaller_h = marshallers[1] |
||||
|
||||
main_c = configure_file(input: 'main.c.in', |
||||
output: 'main-@0@.c'.format(idx), |
||||
configuration: cdata) |
||||
|
||||
genmarshalexe = executable('genmarshalprog-@0@'.format(idx), |
||||
main_c, marshaller_c, marshaller_h, |
||||
dependencies : gobj) |
||||
test('genmarshal test @0@'.format(idx), genmarshalexe) |
||||
idx += 1 |
||||
endforeach |
||||
|
Loading…
Reference in new issue