3 # Input: project_build_root, project_source_root, xmlxx_pcname,
4 # xmlxx_api_version, build_documentation, source_h_files,
5 # install_datadir, python3, doc_reference_py
6 # Output: install_docdir, install_devhelpdir, book_name
8 # There are no built source files in libxml++-2.6.
11 'mm-common-libstdc++',
17 foreach module : tag_file_modules
18 depmod = dependency(module, required: false)
20 doxytagfile = depmod.get_pkgconfig_variable('doxytagfile')
21 htmlrefpub = depmod.get_pkgconfig_variable('htmlrefpub', default: '')
22 htmlrefdir = depmod.get_pkgconfig_variable('htmlrefdir', default: '')
24 htmlrefpub = htmlrefdir
26 htmlrefdir = htmlrefpub
28 doxygen_tagfiles += ' "' + doxytagfile + '=' + htmlrefpub + '"'
31 docinstall_flags += ['-l', doxytagfile.split('/')[-1] + '@' + htmlrefdir]
32 if htmlrefpub != htmlrefdir
34 docinstall_flags += ['-l', 's@' + htmlrefpub + '@' + htmlrefdir]
39 book_name = xmlxx_pcname
40 book_title = meson.project_name() + ' Reference Manual'
42 # Configuration data for Doxyfile.
43 doc_conf_data = configuration_data()
44 doc_conf_data.set('configure_input',
45 'docs/reference/Doxyfile. Generated from Doxyfile.in by meson.configure_file().')
46 doc_conf_data.set('PACKAGE_NAME', meson.project_name())
47 doc_conf_data.set('PACKAGE_VERSION', meson.project_version())
48 doc_conf_data.set('abs_top_builddir', project_build_root)
49 doc_conf_data.set('abs_top_srcdir', project_source_root)
50 doc_conf_data.set('LIBXMLXX_MODULE_NAME', book_name)
51 doc_conf_data.set('DOXYGEN_TAGFILES', doxygen_tagfiles)
56 configuration: doc_conf_data,
59 # Installation directories relative to {prefix}.
60 install_docdir = install_datadir / 'doc' / book_name
61 install_reference_docdir = install_docdir / 'reference'
62 install_devhelpdir = install_datadir / 'devhelp' / 'books' / book_name
64 if not build_documentation
65 # Documentation shall not be built or installed.
66 # Return to the calling meson.build file.
70 # Input .h files to Doxygen.
72 foreach file : source_h_files
73 src_h_files += project_source_root / 'libxml++' / file
75 src_h_files += project_source_root / 'libxml++' / 'libxml++.h'
77 doctool_dir = project_source_root / 'untracked' / 'docs' # MMDOCTOOLDIR
78 doctool_dist_dir = 'untracked' / 'docs' # Relative to MESON_DIST_ROOT
80 tag_file = custom_target('html_and_tag',
82 output: book_name + '.tag',
84 python3, doc_reference_py, 'doxygen',
89 build_by_default: build_documentation,
91 install_dir: install_reference_docdir,
94 devhelp_file = custom_target('devhelp',
96 output: book_name + '.devhelp2',
98 python3, doc_reference_py, 'devhelp',
105 build_by_default: build_documentation,
108 # Install Devhelp file and html files.
109 meson.add_install_script(
110 python3.path(), doc_reference_py, 'install_doc',
112 devhelp_file.full_path(),
114 install_reference_docdir / 'html',
118 if not meson.is_subproject()
119 # Distribute built files and files copied by mm-common-get.
120 # (add_dist_script() is not allowed in a subproject)
121 meson.add_dist_script(
122 python3.path(), doc_reference_py, 'dist_doc',
125 meson.current_build_dir(),
126 tag_file.full_path(),
127 devhelp_file.full_path(),