Debian Codegraph @

docs/meson.build

raw
1 get_option('html-docs').require(
2 run_command(prog_python, '-c',
3 '''
4 try:
5 from packaging.version import Version
6 except:
7 from distutils.version import StrictVersion as Version
8 import hawkmoth
9 assert Version(hawkmoth.__version__) >= Version("0.16.0")
10 ''', check: false).returncode() == 0,
11 error_message: 'hawkmoth >= 0.16.0 required'
12 )
13
14 sphinx_args = []
15 if get_option('werror')
16 sphinx_args += '-W'
17 endif
18
19 html_docs = custom_target(
20 'html',
21 depfile: 'docs.d',
22 depend_files: files('conf.py'),
23 command: [sphinx, '-b', 'html', '-q',
24 '-Ddepfile=@DEPFILE@',
25 sphinx_args,
26 meson.current_source_dir(), '@OUTPUT@'],
27 env: [
28 'MESA_BUILD_ROOT=' + meson.project_build_root()
29 ],
30 depends: [
31 u_format_gen_h,
32 ],
33 output: 'html',
34 build_by_default: get_option('html-docs').enabled(),
35 )
36
37 html_docs_path = get_option('html-docs-path')
38 if html_docs_path == ''
39 html_docs_path = join_paths(get_option('datadir'), 'doc', 'mesa')
40 endif
41
42 install_subdir(html_docs.full_path(),
43 install_dir: html_docs_path,
44 exclude_files: ['.buildinfo'],
45 exclude_directories: ['.doctrees'],
46 strip_directory: true
47 )