subdir('html')
guideindex_xml = files('docbook/GuideIndex.xml')
-destdir = join_paths(meson.project_build_root(), 'doc', 'html/')
-iconsdir = join_paths(meson.project_source_root(), 'doc', 'icons/')
-guideindex_html = join_paths(destdir, 'GuideIndex.html')
+destdir = join_paths(meson.current_build_dir(), 'html/')
+iconsdir = join_paths(meson.current_source_dir(), 'icons/')
guideindex_ln = join_paths(destdir, 'index.html')
-run_command(gnome_doc_tool, 'html', '-o', destdir, '-p', iconsdir, guideindex_xml, check : false)
-run_command(find_program('ln'), '-s', '-f', guideindex_html, guideindex_ln, check : false)
+option = get_option('yelp-build')
+if not option.disabled()
+ gnome_doc_tool = find_program('yelp-build', required : false)
+ if gnome_doc_tool.found()
+ run_command(gnome_doc_tool, 'html', '-o', destdir, '-p', iconsdir, guideindex_xml, check : false)
+ run_command(find_program('ln'), '-s', '-f', 'GuideIndex.html', guideindex_ln, check : false)
+ summary({'help' : ['Help files created:', true]}, section : 'Documentation', bool_yn : true)
+ else
+ summary({'help' : ['yelp-build not found - Help files created:', false]}, section : 'Documentation', bool_yn : true)
+ endif
+else
+ summary({'help' : ['disabled - Help files created:', false]}, section : 'Documentation', bool_yn : true)
+endif
-install_subdir(destdir, install_dir : helpdir, install_tag : 'help')
+install_subdir(destdir, install_dir : helpdir, exclude_directories : 'lua-api/latex')
-srcdir = join_paths(meson.project_source_root())
-destdir = join_paths(meson.project_build_root(), 'doc', 'html', 'lua-api')
+if running_from_git
+ option = get_option('doxygen')
+ if not option.disabled()
+ doxygen = find_program('doxygen', required : false)
+ if doxygen.found()
+ srcdir = join_paths(meson.project_source_root())
+ destdir = join_paths(meson.project_build_root(), 'doc', 'html', 'lua-api')
+ run_command(find_program('create-doxygen-lua-api.sh'), srcdir, destdir, check : false)
+ summary({'lua-api' : ['lua-api help file created:', true]}, section : 'Documentation', bool_yn : true)
+ else
+ summary({'lua-api' : ['doxygen not found - lua-api help file created:', false]}, section : 'Documentation', bool_yn : true)
+ endif
+ else
+ summary({'lua-api' : ['disabled - lua-api help file created:', false]}, section : 'Documentation', bool_yn : true)
+ endif
+endif
-run_command(find_program('create-doxygen-lua-api.sh'), srcdir, destdir, check : false)
-
-install_subdir(destdir, install_dir : htmldir, install_tag : 'html')
+script_sources += files('create-doxygen-lua-api.sh',
+'create-shortcuts-xml.sh')