sphinx_build = find_program(fs.parent(python.full_path()) / 'sphinx-build',
                            required: get_option('docs'))

# Check if tools are available to build documentation.
build_docs = false
if sphinx_build.found()
  SPHINX_ARGS = ['env', 'CONFDIR=' + qemu_confdir, sphinx_build, '-q']
  # If we're making warnings fatal, apply this to Sphinx runs as well
  if get_option('werror')
    SPHINX_ARGS += [ '-W', '-Dkerneldoc_werror=1' ]
  endif

  sphinx_version = run_command(SPHINX_ARGS + ['--version'],
                               check: true).stdout().split()[1]
  if sphinx_version.version_compare('>=1.7.0')
    SPHINX_ARGS += ['-j', 'auto']
  else
    nproc = find_program('nproc')
    if nproc.found()
      jobs = run_command(nproc, check: true).stdout()
      SPHINX_ARGS += ['-j', jobs]
    endif
  endif

  # This is a bit awkward but works: create a trivial document and
  # try to run it with our configuration file (which enforces a
  # version requirement). This will fail if sphinx-build is too old.
  run_command('mkdir', ['-p', tmpdir / 'sphinx'], check: true)
  run_command('touch', [tmpdir / 'sphinx/index.rst'], check: true)
  sphinx_build_test_out = run_command(SPHINX_ARGS + [
    '-c', meson.current_source_dir(),
    '-b', 'html', tmpdir / 'sphinx',
    tmpdir / 'sphinx/out'], check: false)
  build_docs = (sphinx_build_test_out.returncode() == 0)

  if not build_docs
    warning('@0@: @1@'.format(sphinx_build.full_path(), sphinx_build_test_out.stderr()))
    if get_option('docs').enabled()
      error('Install a Python 3 version of python-sphinx and the readthedoc theme')
    endif
  endif
endif

if build_docs
  SPHINX_ARGS += ['-Dversion=' + meson.project_version(), '-Drelease=' + get_option('pkgversion')]

  man_pages = {
        'qemu-ga.8': (have_ga ? 'man8' : ''),
        'qemu-ga-ref.7': (have_ga ? 'man7' : ''),
        'qemu-qmp-ref.7': 'man7',
        'qemu-storage-daemon-qmp-ref.7': (have_tools ? 'man7' : ''),
        'qemu-img.1': (have_tools ? 'man1' : ''),
        'qemu-nbd.8': (have_tools ? 'man8' : ''),
        'qemu-pr-helper.8': (have_tools ? 'man8' : ''),
        'qemu-storage-daemon.1': (have_tools ? 'man1' : ''),
        'qemu-trace-stap.1': (stap.found() ? 'man1' : ''),
        'qemu.1': 'man1',
        'qemu-block-drivers.7': 'man7',
        'qemu-cpu-models.7': 'man7'
  }

  sphinxdocs = []
  sphinxmans = []

  private_dir = meson.current_build_dir() / 'manual.p'
  output_dir = meson.current_build_dir() / 'manual'
  input_dir = meson.current_source_dir()

  this_manual = custom_target('QEMU manual',
                build_by_default: build_docs,
                output: 'docs.stamp',
                input: files('conf.py'),
                depfile: 'docs.d',
                command: [SPHINX_ARGS, '-Ddepfile=@DEPFILE@',
                          '-Ddepfile_stamp=@OUTPUT0@',
                          '-b', 'html', '-d', private_dir,
                          input_dir, output_dir])
  sphinxdocs += this_manual
  install_subdir(output_dir, install_dir: qemu_docdir, strip_directory: true)

  these_man_pages = []
  install_dirs = []
  foreach page, section : man_pages
    these_man_pages += page
    install_dirs += section == '' ? false : get_option('mandir') / section
  endforeach

  sphinxmans += custom_target('QEMU man pages',
                              build_by_default: build_docs,
                              output: these_man_pages,
                              input: this_manual,
                              install: build_docs,
                              install_dir: install_dirs,
                              command: [SPHINX_ARGS, '-b', 'man', '-d', private_dir,
                                        input_dir, meson.current_build_dir()])

  alias_target('sphinxdocs', sphinxdocs)
  alias_target('html', sphinxdocs)
  alias_target('man', sphinxmans)
endif

test('QAPI firmware.json regression tests', qapi_gen,
     args: ['-o', meson.current_build_dir() / 'qapi',
            meson.current_source_dir() / 'interop/firmware.json'],
     suite: ['qapi-schema', 'qapi-interop'])
