summaryrefslogtreecommitdiffstats
path: root/test cases/frameworks/7 gnome/genmarshal/meson.build
blob: 9a2cd7a0007dd6a2ce4f076665bfd5b672fd9e4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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]

  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