Fix version number in generated gtk-doc (#3259)

* Fix version number in generated gtk-doc

By using a separate XML file for the version number.

Resolves: #3255.

* Avoid newline in `version.xml.in`
This commit is contained in:
Kleis Auke Wolthuizen 2023-01-03 12:56:56 +01:00 committed by GitHub
parent 1b9a6397d7
commit 60e18873fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 9 deletions

View File

@ -4,12 +4,13 @@
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
]>
<book id="index" xmlns:xlink="http://www.w3.org/1999/xlink">
<bookinfo>
<title>libvips Reference Manual</title>
<releaseinfo>
For libvips @VIPS_VERSION@. The latest version of this documentation
For libvips &version;. The latest version of this documentation
can be found on the <ulink role="online-location" url="/">libvips
website</ulink>.
</releaseinfo>

View File

@ -126,8 +126,12 @@ images = files(
)
version_conf = configuration_data()
version_conf.set('VIPS_VERSION', meson.project_version ())
vips_docs = configure_file(input: 'libvips-docs.xml.in', output: 'libvips-docs.xml', configuration: version_conf)
version_conf.set('VIPS_VERSION', meson.project_version())
version_xml = configure_file(
input: 'version.xml.in',
output: '@BASENAME@',
configuration: version_conf
)
glib_prefix = glib_dep.get_variable(pkgconfig: 'prefix')
glib_docpath = glib_prefix / 'share' / 'gtk-doc' / 'html'
@ -135,16 +139,14 @@ docpath = get_option('prefix') / get_option('datadir') / 'gtk-doc' / 'html'
gnome.gtkdoc('libvips',
mode: 'none',
main_xml: 'libvips-docs.xml.in',
main_xml: 'libvips-docs.xml',
src_dir: [
join_paths(project_source_root, 'libvips'),
join_paths(project_build_root, 'libvips'),
],
dependencies: libvips_dep,
scan_args: [
'--ignore-headers=' + ' '.join(private_headers),
'--rebuild-types',
],
ignore_headers: private_headers,
scan_args: '--rebuild-types',
mkdb_args: [ '--default-includes=vips/vips.h' ],
fixxref_args: [
'--html-dir=@0@'.format(docpath),
@ -152,7 +154,7 @@ gnome.gtkdoc('libvips',
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')),
],
content_files: [ content_files, markdown_content_files_docbook ],
content_files: [ content_files, markdown_content_files_docbook, version_xml ],
expand_content_files: [ content_files ],
html_assets: images,
install: true

1
doc/version.xml.in Normal file
View File

@ -0,0 +1 @@
@VIPS_VERSION@