File: meson.build

package info (click to toggle)
srain 1.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,720 kB
  • sloc: ansic: 18,234; python: 106; makefile: 57; sh: 35; xml: 25
file content (29 lines) | stat: -rw-r--r-- 781 bytes parent folder | download | duplicates (3)
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
# meson.build for Sphinx documentation
#

doc_builders = get_option('doc_builders')
sphinx = find_program('sphinx-build', required: doc_builders.length() != 0)
sphinx_source_dir = meson.current_source_dir()
sphinx_build_dir = meson.current_build_dir()

# Build documentation
if sphinx.found()
  foreach b: doc_builders
    run_command(
      sphinx,
      '-b', b,
      sphinx_source_dir,
      join_paths(sphinx_build_dir, b),
      check: true)
  endforeach

  # `in` operator requires meson 0.49.0
  if doc_builders.contains('man')
    install_man(join_paths(sphinx_build_dir, 'man', 'srain.1'))
  endif

  # `in` operator requires meson 0.49.0
  if doc_builders.contains('html')
    install_subdir(join_paths(sphinx_build_dir, 'html'), install_dir: pkg_doc_dir)
  endif
endif