install_data(fonts, install_dir: docs_html_dir / 'fonts')
-# This hack enables us to view the web pages
-# from within the uninstalled build tree
foreach file : fonts
+ # This hack enables us to view the web pages
+ # from within the uninstalled build tree
configure_file(input: file, output: file, copy: true)
+
+ install_web_files += '@0@:@1@'.format(meson.current_source_dir() / file, docs_html_dir / 'fonts')
endforeach
install_data(apipng, install_dir: docs_html_dir / 'html')
+foreach file : apipng
+ install_web_files += '@0@:@1@'.format(meson.current_source_dir() / file, docs_html_dir / 'html')
+endforeach
+
docs_html_gen = []
docs_html_dep = []
docs_html_paths = []
+install_web_deps += docs_html_dep
+
foreach file : docs_html_gen
docs_html_paths += file.full_path()
+ install_web_files += '@0@:@1@'.format(file.full_path(), docs_html_dir / 'html')
endforeach
test(
html_in_file = '@0@.html.in'.format(name)
html_file = '@0@.html'.format(name)
- custom_target(
+ out_file = custom_target(
html_file,
input: html_in_file,
output: html_file,
install: true,
install_dir: docs_html_dir / 'internals',
)
+
+ install_web_deps += out_file
+ install_web_files += '@0@:@1@'.format(out_file.full_path(), docs_html_dir / 'internals')
endforeach
install_data(docs_js_files, install_dir: docs_html_dir / 'js')
-# This hack enables us to view the web pages
-# from within the uninstalled build tree
foreach file : docs_js_files
+ # This hack enables us to view the web pages
+ # from within the uninstalled build tree
configure_file(input: file, output: file, copy: true)
+
+ install_web_files += '@0@:@1@'.format(meson.current_source_dir() / file, docs_html_dir / 'js')
endforeach
html_in = docs_rst2html_gen.process(rst_file)
- custom_target(
+ out_file = custom_target(
html_file,
input: html_in,
output: html_file,
install: true,
install_dir: docs_html_dir / 'kbase',
)
+
+ install_web_deps += out_file
+ install_web_files += '@0@:@1@'.format(out_file.full_path(), docs_html_dir / 'kbase')
endforeach
install_data(docs_logo_files, install_dir: docs_html_dir / 'logos')
-# This hack enables us to view the web pages
-# from within the uninstalled build tree
foreach file : docs_logo_files
+ # This hack enables us to view the web pages
+ # from within the uninstalled build tree
configure_file(input: file, output: file, copy: true)
+
+ install_web_files += '@0@:@1@'.format(meson.current_source_dir() / file, docs_html_dir / 'logos')
endforeach
capture: true,
)
- custom_target(
+ out_file = custom_target(
html_file,
input: html_in,
output: html_file,
install: true,
install_dir: docs_html_dir / 'manpages',
)
+
+ install_web_deps += out_file
+ install_web_files += '@0@:@1@'.format(out_file.full_path(), docs_html_dir / 'manpages')
endforeach
'submitting-patches',
]
+# list of web targets to build for docs/web rule
+install_web_deps = []
+install_web_files = []
+
install_data(docs_assets, install_dir: docs_html_dir)
aclperms_gen = custom_target(
html_in_file = '@0@.html.in'.format(name)
html_file = '@0@.html'.format(name)
- custom_target(
+ out_file = custom_target(
html_file,
input: html_in_file,
output: html_file,
install: true,
install_dir: docs_html_dir,
)
+
+ install_web_deps += out_file
+ install_web_files += '@0@:@1@'.format(out_file.full_path(), docs_html_dir)
endforeach
html_file = '@0@.html'.format(data['name'])
rst_in_file = '@0@.rst'.format(data['name'])
- custom_target(
+ out_file = custom_target(
html_file,
input: data['file'],
output: html_file,
install: true,
install_dir: docs_html_dir,
)
+
+ install_web_deps += out_file
+ install_web_files += '@0@:@1@'.format(out_file.full_path(), docs_html_dir)
endforeach
subdir('fonts')
subdir('schemas')
-# This hack enables us to view the web pages
-# from within the uninstalled build tree
foreach file : docs_assets
+ # This hack enables us to view the web pages
+ # from within the uninstalled build tree
configure_file(input: file, output: file, copy: true)
+
+ install_web_files += '@0@:@1@'.format(meson.current_source_dir() / file, docs_html_dir)
endforeach
+
+run_target(
+ 'install-web',
+ command: [
+ meson_python_prog, python3_prog.path(), meson_install_web_prog.path(),
+ install_web_files,
+ ],
+ depends: install_web_deps,
+)
--- /dev/null
+#!/usr/bin/env python3
+
+import os
+import shutil
+import sys
+
+for desc in sys.argv[1:]:
+ inst = desc.split(':')
+ os.makedirs(inst[1], exist_ok=True)
+ shutil.copy(inst[0], inst[1])
'meson-html-gen.py',
'meson-install-dirs.py',
'meson-install-symlink.py',
+ 'meson-install-web.py',
'meson-python.sh',
'meson-timestamp.py',
'mock-noinline.py',