[go: up one dir, main page]

File: meson.build

package info (click to toggle)
template-glib 3.38.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 788 kB
  • sloc: ansic: 6,774; yacc: 288; lex: 237; javascript: 16; makefile: 14; python: 12
file content (44 lines) | stat: -rw-r--r-- 1,028 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
if not get_option('introspection').allowed()
  error('API reference requires introspection.')
endif

toml_conf = configuration_data()
toml_conf.set('version', meson.project_version())

gidocgen = find_program('gi-docgen')

gidocgen_common_args = [
  '--quiet',
  '--no-namespace-dir',
]

if get_option('werror')
  gidocgen_common_args += ['--fatal-warnings']
endif

docs_dir = get_option('datadir') / 'doc'

source_toml = configure_file(
  input: 'template-glib.toml.in',
  output: 'template-glib.toml',
  configuration: toml_conf,
  install: true,
  install_dir: docs_dir / 'template-glib-@0@'.format(apiversion),
)

custom_target('template-glib-doc',
  input: [ source_toml, libtemplate_glib_gir[0] ],
  output: 'template-glib-@0@'.format(apiversion),
  command: [
    gidocgen,
    'generate',
    gidocgen_common_args,
    '--config=@INPUT0@',
    '--output-dir=@OUTPUT@',
    '--content-dir=@0@'.format(meson.current_source_dir()),
    '@INPUT1@',
  ],
  build_by_default: true,
  install: true,
  install_dir: docs_dir,
)