File: meson.build

package info (click to toggle)
libcloudproviders 0.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 340 kB
  • sloc: ansic: 2,243; xml: 15; makefile: 10; javascript: 5
file content (60 lines) | stat: -rw-r--r-- 1,466 bytes parent folder | download
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
55
56
57
58
59
60
expand_content_md_files = [
  'overview.md',
  'integration-client.md',
  'integration-server.md',
  'cloudproviders-dbus.md',
]

toml_data = configuration_data()
toml_data.set('VERSION', meson.project_version())

libcloudproviders_toml = configure_file(
  input: 'libcloudproviders.toml.in',
  output: 'libcloudproviders.toml',
  configuration: toml_data
)

dependency(
  'gi-docgen', version: '>= 2021.1',
  fallback: ['gi-docgen', 'dummy_dep'],
  native: true,
  required: get_option('documentation')
)

gidocgen = find_program('gi-docgen')

docs_dir = datadir / 'doc'

custom_target('libcloudproviders-doc',
  input: [ libcloudproviders_toml, libcloudproviders_gir[0], libcloudproviders_dbus_files ],
  output: 'libcloudproviders-@0@'.format(libcloudproviders_api_version),
  command: [
    gidocgen,
    'generate',
    '--quiet',
    '--config=@INPUT0@',
    '--output-dir=@OUTPUT@',
    '--no-namespace-dir',
    '--content-dir=@0@'.format(meson.current_source_dir()),
    '--content-dir=@0@'.format(libcloudproviders_dbus_files_dir),
    '@INPUT1@',
  ],
  depend_files: [ expand_content_md_files ],
  build_by_default: true,
  install: true,
  install_dir: docs_dir,
  install_tag: 'doc',
)

test('Validate docs',
  gidocgen,
  args: [
    'check',
    '--config', libcloudproviders_toml,
    '--add-include-path=@0@'.format(meson.current_build_dir() / '../src'),
    libcloudproviders_gir[0],
  ],
  depends: libcloudproviders_gir[0],
  suite: ['doc'],
)