summaryrefslogtreecommitdiff
path: root/docs/reference/libqmi-glib/meson.build
blob: 2f5cfc374ea684242f45d6b18635d67233c3a00a (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2019 - 2021 IƱigo Martinez <inigomartinez@gmail.com>

subdir('xml')

doc_module = 'libqmi-glib'

src_dirs = [
  generated_inc,
  libqmi_glib_inc,
]

private_headers = [
  'qmi-ctl.h',
  'qmi-endpoint.h',
  'qmi-endpoint-mbim.h',
  'qmi-endpoint-qmux.h',
  'qmi-endpoint-qrtr.h',
  'qmi-enums-private.h',
  'qmi-enum-types-private.h',
  'qmi-file.h',
  'qmi-flag-types-private.h',
  'qmi-helpers.h',
  'qmi-net-port-manager.h',
  'qmi-net-port-manager-rmnet.h',
  'qmi-net-port-manager-qmiwwan.h',
  'test-fixture.h',
  'test-port-context.h',
  'if_link_rmnet.h',
]

scan_args = [
  '--rebuild-types',
  '--deprecated-guards="QMI_DISABLE_DEPRECATED"',
]

glib_prefix = glib_dep.get_pkgconfig_variable('prefix')

fixxref_args = [
  '--html-dir=' + (qmi_prefix / gnome.gtkdoc_html_dir(doc_module)),
  '--extra-dir=' + (glib_prefix / gnome.gtkdoc_html_dir('glib')),
  '--extra-dir=' + (glib_prefix / gnome.gtkdoc_html_dir('gio')),
]

name = doc_module + '-sections.txt'

'''
FIXME: gen_sections should be used in the `input` field but it would add
       a dependency over file paths that are not yet created, so
       the `depends` section is used to generate alternate dependency.
       This is fixed in newer meson versions.
'''
sections_txt = custom_target(
  name,
  input: 'libqmi-glib-common.sections',
  output: name,
  capture: true,
  command: [find_program('cat'), '@INPUT@'] + gen_sections,
  depends: gen_sections_deps,
)

version_xml = configure_file(
  input: 'version.xml.in',
  output: '@BASENAME@',
  configuration: version_conf,
)

gnome.gtkdoc(
  doc_module,
  main_xml: doc_module + '-docs.xml',
  src_dir: src_dirs,
  ignore_headers: private_headers,
  include_directories: top_inc,
  gobject_typesfile: doc_module + '.types',
  dependencies: libqmi_glib_dep,
  namespace: 'qmi',
  scan_args: scan_args,
  fixxref_args: fixxref_args,
  content_files: [sections_txt, version_xml],
  install: true,
  check: true,
)