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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
docs_logo_files = [
'logo-banner-dark-256.png',
'logo-banner-dark-800.png',
'logo-banner-dark.svg',
'logo-banner-light-256.png',
'logo-banner-light-800.png',
'logo-banner-light.svg',
'logo-base.svg',
'logo-square-128.png',
'logo-square-192.png',
'logo-square-256.png',
'logo-square-96.png',
'logo-square-powered-128.png',
'logo-square-powered-192.png',
'logo-square-powered-256.png',
'logo-square-powered-96.png',
'logo-square-powered.svg',
'logo-square.svg',
'logo-sticker-hexagon.svg',
'logo-sticker-square.svg',
]
install_data(docs_logo_files, install_dir: docs_html_dir / 'logos')
foreach file : docs_logo_files
# This hack enables us to view the web pages
# from within the uninstalled build tree
if meson.version().version_compare('>=0.64.0')
logofile = fs.copyfile(file)
install_web_deps += logofile
else
configure_file(input: file, output: file, copy: true)
endif
install_web_files += '@0@:@1@'.format(meson.current_source_dir() / file, docs_html_dir / 'logos')
endforeach
html_xslt_gen_install_dir = docs_html_dir / 'logos'
html_xslt_gen = []
# README.rst is formatted as index.html for viewing
html_xslt_gen += {
'name': 'index',
'file': docs_rst2html5_gen.process('README.rst'),
'source': 'docs' / 'logos' / 'README.rst',
'href_base': '../',
}
# --- begin of XSLT processing ---
foreach data : html_xslt_gen
html_filename = data['name'] + '.html'
html_file = custom_target(
html_filename,
input: data.get('file', data['name'] + '.html.in'),
output: html_filename,
command: [
xsltproc_prog,
'--stringparam', 'pagesrc', data.get('source', ''),
'--stringparam', 'builddir', meson.project_build_root(),
'--stringparam', 'timestamp', docs_timestamp,
'--stringparam', 'link_href_base', data.get('href_base', ''),
'--stringparam', 'asset_href_base', data.get('href_base', ''),
'--stringparam', 'edit_href_base', 'https://gitlab.com/libvirt/libvirt/-/blob/master/',
'--nonet',
site_xsl,
'@INPUT@',
],
depends: data.get('depends', []),
depend_files: [ page_xsl ],
capture: true,
install: true,
install_dir: html_xslt_gen_install_dir,
)
install_web_deps += html_file
install_web_files += html_file.full_path() + ':' + html_xslt_gen_install_dir
endforeach
html_xslt_gen = []
# --- end of XSLT processing ---
|