File: meson.build

package info (click to toggle)
glib2.0 2.84.1-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 66,144 kB
  • sloc: ansic: 538,877; python: 9,624; sh: 1,572; xml: 1,482; perl: 1,222; cpp: 535; makefile: 316; javascript: 11
file content (140 lines) | stat: -rw-r--r-- 3,383 bytes parent folder | download | duplicates (4)
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
gio_manpages = [
  'gapplication',
  'gdbus-codegen',
  'gdbus',
  'gio-querymodules',
  'gio',
  'glib-compile-resources',
  'glib-compile-schemas',
  'gresource',
  'gsettings',
]

if get_option('man-pages').enabled()
  foreach page: gio_manpages
    custom_target(page + '-man',
      input: page + '.rst',
      output: page + '.1',
      command: [
        rst2man,
        rst2man_flags,
        '@INPUT@',
      ],
      capture: true,
      install: true,
      install_dir: man1_dir,
      install_tag: 'doc',
    )
  endforeach
endif

if get_option('documentation')
  man_html_path = docs_dir / 'gio-2.0'

  foreach page: gio_manpages
    custom_target(
      input: page + '.rst',
      output: page + '.html',
      command: [
        rst2html5,
        '@INPUT@',
      ],
      capture: true,
      install: true,
      install_dir: man_html_path,
      install_tag: 'doc',
    )
  endforeach
endif

if get_option('documentation') and enable_gir
  expand_content_files = [
    'dbus-error.md',
    'dbus-introspection.md',
    'dbus-name-owning.md',
    'dbus-name-watching.md',
    'dbus-utils.md',
    'error.md',
    'file-attributes.md',
    'io-scheduler.md',
    'menu-exporter.md',
    'migrating-gconf.md',
    'migrating-gdbus.md',
    'migrating-gnome-vfs.md',
    'migrating-posix.md',
    'networking.md',
    'overview.md',
    'pollable-utils.md',
    'tls-overview.md',
    'content-types.md',
  ]
  expand_content_unix_files = [
    'unix-mounts.md',
  ]
  expand_content_win32_files = []

  gio_toml = configure_file(input: 'gio.toml.in', output: 'gio.toml', configuration: toml_conf)

  custom_target('gio-docs',
    input: [ gio_toml, gio_gir[0] ],
    output: 'gio-2.0',
    command: [
      gidocgen,
      'generate',
      gidocgen_common_args,
      '--config=@INPUT0@',
      '--output-dir=@OUTPUT@',
      '--content-dir=@0@'.format(meson.current_source_dir()),
      '@INPUT1@',
    ],
    build_by_default: true,
    depend_files: expand_content_files,
    install: true,
    install_dir: docs_dir,
    install_tag: 'doc',
  )

  if host_system == 'windows'
    gio_win32_toml = configure_file(input: 'gio-win32.toml.in', output: 'gio-win32.toml', configuration: toml_conf)

    custom_target('gio-win32-docs',
      input: [ gio_win32_toml, gio_win32_gir[0] ],
      output: 'gio-win32-2.0',
      command: [
        gidocgen,
        'generate',
        gidocgen_common_args,
        '--config=@INPUT0@',
        '--output-dir=@OUTPUT@',
        '--content-dir=@0@'.format(meson.current_source_dir()),
        '@INPUT1@',
      ],
      build_by_default: true,
      depend_files: expand_content_win32_files,
      install: true,
      install_dir: docs_dir,
      install_tag: 'doc',
    )
  else
    gio_unix_toml = configure_file(input: 'gio-unix.toml.in', output: 'gio-unix.toml', configuration: toml_conf)

    custom_target('gio-unix-docs',
      input: [ gio_unix_toml, gio_unix_gir[0] ],
      output: 'gio-unix-2.0',
      command: [
        gidocgen,
        'generate',
        gidocgen_common_args,
        '--config=@INPUT0@',
        '--output-dir=@OUTPUT@',
        '--content-dir=@0@'.format(meson.current_source_dir()),
        '@INPUT1@',
      ],
      build_by_default: true,
      depend_files: expand_content_unix_files,
      install: true,
      install_dir: docs_dir,
      install_tag: 'doc',
    )
  endif
endif