File: meson.build

package info (click to toggle)
mesa 25.3.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 322,268 kB
  • sloc: ansic: 2,212,173; xml: 1,032,268; cpp: 519,750; python: 81,988; asm: 40,568; yacc: 11,976; lisp: 5,067; lex: 3,452; sh: 1,049; makefile: 224
file content (47 lines) | stat: -rw-r--r-- 1,152 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
get_option('html-docs').require(
  run_command(prog_python, '-c',
  '''
try:
  from packaging.version import Version
except:
  from distutils.version import StrictVersion as Version
import hawkmoth
assert Version(hawkmoth.__version__) >= Version("0.16.0")
  ''', check: false).returncode() == 0,
  error_message: 'hawkmoth >= 0.16.0 required'
)

sphinx_args = []
if get_option('werror')
  sphinx_args += '-W'
endif

html_docs = custom_target(
  'html',
  depfile: 'docs.d',
  depend_files: files('conf.py'),
  command: [sphinx, '-b', 'html', '-q',
            '-Ddepfile=@DEPFILE@',
            sphinx_args,
            meson.current_source_dir(), '@OUTPUT@'],
  env: [
    'MESA_BUILD_ROOT=' + meson.project_build_root()
  ],
  depends: [
    u_format_gen_h,
  ],
  output: 'html',
  build_by_default: get_option('html-docs').enabled(),
)

html_docs_path = get_option('html-docs-path')
if html_docs_path == ''
  html_docs_path = join_paths(get_option('datadir'), 'doc', 'mesa')
endif

install_subdir(html_docs.full_path(),
  install_dir: html_docs_path,
  exclude_files: ['.buildinfo'],
  exclude_directories: ['.doctrees'],
  strip_directory: true
)