1get_option('html-docs').require( 2 run_command(prog_python, '-c', 3 ''' 4try: 5 from packaging.version import Version 6except: 7 from distutils.version import StrictVersion as Version 8import hawkmoth 9assert Version(hawkmoth.__version__) >= Version("0.16.0") 10 ''', check: false).returncode() == 0, 11 error_message: 'hawkmoth >= 0.16.0 required' 12) 13 14sphinx_args = [] 15if get_option('werror') 16 sphinx_args += '-W' 17endif 18 19html_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 output: 'html', 28 build_by_default: get_option('html-docs').enabled(), 29) 30 31html_docs_path = get_option('html-docs-path') 32if html_docs_path == '' 33 html_docs_path = join_paths(get_option('datadir'), 'doc', 'mesa') 34endif 35 36install_subdir(html_docs.full_path(), 37 install_dir: html_docs_path, 38 exclude_files: ['.buildinfo'], 39 exclude_directories: ['.doctrees'], 40 strip_directory: true 41) 42