2025-10-28 00:36:53 +01:00
|
|
|
proto_to_docboox_xsl = files('xsl/protocol-to-docbook.xsl')
|
|
|
|
|
proto_iface_to_docboox_xsl = files('xsl/protocol-interfaces-to-docbook.xsl')
|
|
|
|
|
merge_mapcoords_xsl = files('xsl/merge-mapcoords.xsl')
|
|
|
|
|
to_publican_xsl = files('xsl/doxygen-to-publican.xsl')
|
Add Meson build
Meson is a next generation build system, simpler than Autotools and also faster
and more portable. Most importantly, it will make integrating ASan easier in
CI.
The goal is to maintain feature parity of the Meson build with the
Autotools build, until such time when we can drop the latter.
Add a script which generates the desired Doxygen configuration for our various
output formats and executes it using that configuration. This is not something
Meson can or should do.
Fixes: https://gitlab.freedesktop.org/wayland/wayland/issues/80
[daniels: Changed to bump version, use GitLab issues URL, remove header
checks not used in any code, remove pre-pkg-config Expat
support, added missing include paths to wayland-egl and
cpp-compile-test, added GitLab CI.
Bumped version, removed unnecessary pkg-config paths.]
[daniels: Properly install into mandir/man3 via some gross
paramaterisation, generate real stamp files.]
Pekka:
- squashed patches
- removed MAKEFLAGS from meson CI
- remove unused PACKAGE* defines
- fix up scanner dependency handling
- instead of host_scanner option, build wayland-scanner twice when cross-compiling
- changed .pc files to match more closely the autotools versions
- reorder doxygen man sources to reduce diff to autotools
- fix pkgconfig.generate syntax warnings (new in Meson)
- bump meson version to 0.47 for configure_file(copy) and run_command(check)
- move doc tool checks into doc/meson.build, needed in more places
- make all doc tools mandatory if building docs
- check dot and doxygen versions
- add build files under doc/publican
- reindent to match Weston Meson style
Simon:
- Remove install arg from configure_file
- Don't build wayland-scanner twice during cross-build
- Fix naming of the threads dependency
- Store tests in dict
- Add missing HAVE_* decls for functions
- Remove unused cc_native variable
- Make doxygen targets a dict
- Make dot_gv a dict
- Use dicts in man_pages
- Make decls use dicts
- Make generated_headers use dicts
- Align Meson version number with autotool's
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Signed-off-by: Simon Ser <contact@emersion.fr>
2018-04-23 14:29:16 +01:00
|
|
|
|
2025-10-28 00:36:53 +01:00
|
|
|
publican_inputs = []
|
2025-12-27 21:44:29 +02:00
|
|
|
publican_image_maps = []
|
2025-10-28 00:36:53 +01:00
|
|
|
|
|
|
|
|
foreach src : files([
|
|
|
|
|
'Wayland.xml', # must be first in publican_inputs
|
|
|
|
|
'Wayland.ent',
|
|
|
|
|
'Book_Info.xml',
|
|
|
|
|
'Author_Group.xml',
|
|
|
|
|
'Foreword.xml',
|
|
|
|
|
'Protocol.xml',
|
|
|
|
|
'Xwayland.xml',
|
|
|
|
|
'Compositors.xml',
|
2025-10-28 11:54:12 +01:00
|
|
|
'Content_Updates.xml',
|
2025-10-28 00:36:53 +01:00
|
|
|
'Color.xml',
|
|
|
|
|
'Client.xml',
|
|
|
|
|
'Server.xml',
|
doc: document the Wayland XML dialect
Document the XML tags used to describe Wayland protocols. Previously we
only had the informal specification in the Protocol chapter, and the
DTD. Better late than never.
I have looked into wayland-scanner and libwayland for various
limitations documented here possibly for the first time. I have also
forbid things that are not in use or are known broken, including
unspecified interface for a new_id in an event, or an object argument
with an unspecified interface.
I did investigate writing a RELAX NG compact schema for Wayland and
documenting everything there, then generating DocBook XML from it.
However, it seems generating documentation from schema is actually
really complicated. I found these tools:
- xs3p stylesheet: website looks dead, though Sourceforge still
has it. Produces XHTML, not DocBook. Has an unfamiliar license.
- xsddoc: the authors wrote that XSLT is not really sufficient, so they
abandoned this approach and went for Java to create xnsdoc.
- xnsdoc: seems to be proprietary licensed, although one could ask for a
free license for a FLOSS project.
All in all, it seems to be much easier to just write the documentation
in DocBook, copying the strcture from the DTD manually, than to generate
it. It's not doing to change often, anyway. It also allowed me to
leverage DocBook syntax in full.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-12-30 14:59:27 +02:00
|
|
|
'Message_XML.xml',
|
2025-10-28 00:36:53 +01:00
|
|
|
])
|
|
|
|
|
name = fs.name(src)
|
|
|
|
|
publican_inputs += fs.copyfile(name)
|
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
|
|
publican_inputs += custom_target(
|
|
|
|
|
'ProtocolSpec.xml',
|
|
|
|
|
command: [ xsltproc, '-o', '@OUTPUT@', proto_to_docboox_xsl, '@INPUT@' ],
|
|
|
|
|
input: wayland_protocol_xml,
|
|
|
|
|
output: 'ProtocolSpec.xml'
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
publican_inputs += custom_target(
|
|
|
|
|
'ProtocolInterfaces.xml',
|
|
|
|
|
command: [ xsltproc, '-o', '@OUTPUT@', proto_iface_to_docboox_xsl, '@INPUT@' ],
|
|
|
|
|
input: wayland_protocol_xml,
|
|
|
|
|
output: 'ProtocolInterfaces.xml'
|
|
|
|
|
)
|
|
|
|
|
|
2025-12-28 11:32:43 +02:00
|
|
|
# Doxygen generates a myriad of files, and offers an XSLT
|
|
|
|
|
# to combine them all into one. This does the combining.
|
|
|
|
|
# The result is still Doxygen XML.
|
2025-10-28 00:36:53 +01:00
|
|
|
ClientAPI_combined = custom_target(
|
2025-12-28 11:32:43 +02:00
|
|
|
'ClientAPI-combine-doxygen-files',
|
2025-10-28 00:36:53 +01:00
|
|
|
command: [ xsltproc, '-o', '@OUTPUT@', '@INPUT@' ],
|
|
|
|
|
input: [ doxygen_Client_combine_xslt, doxygen_Client_index_xml ],
|
|
|
|
|
output: 'ClientAPI-combined.xml'
|
|
|
|
|
)
|
|
|
|
|
|
2025-12-28 11:32:43 +02:00
|
|
|
# This converts Doxygen XML to DocBook XML.
|
2025-10-28 00:36:53 +01:00
|
|
|
publican_inputs += custom_target(
|
2025-12-28 11:32:43 +02:00
|
|
|
'ClientAPI-doxygen-to-docbook',
|
2025-10-28 00:36:53 +01:00
|
|
|
command: [ xsltproc, '-o', '@OUTPUT@', '--stringparam', 'which', 'Client', to_publican_xsl, '@INPUT@' ],
|
|
|
|
|
input: ClientAPI_combined,
|
|
|
|
|
output: 'ClientAPI.xml'
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
ServerAPI_combined = custom_target(
|
2025-12-28 11:32:43 +02:00
|
|
|
'ServerAPI-combine-doxygen-files',
|
2025-10-28 00:36:53 +01:00
|
|
|
command: [ xsltproc, '-o', '@OUTPUT@', '@INPUT@' ],
|
|
|
|
|
input: [ doxygen_Server_combine_xslt, doxygen_Server_index_xml ],
|
|
|
|
|
output: 'ServerAPI-combined.xml'
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
publican_inputs += custom_target(
|
2025-12-28 11:32:43 +02:00
|
|
|
'ServerAPI-doxygen-to-docbook',
|
2025-10-28 00:36:53 +01:00
|
|
|
command: [ xsltproc, '-o', '@OUTPUT@', '--stringparam', 'which', 'Server', to_publican_xsl, '@INPUT@' ],
|
|
|
|
|
input: ServerAPI_combined,
|
|
|
|
|
output: 'ServerAPI.xml'
|
|
|
|
|
)
|
|
|
|
|
|
2025-12-27 21:44:29 +02:00
|
|
|
subdir('html/css')
|
|
|
|
|
subdir('html/images')
|
|
|
|
|
|
2025-10-28 00:36:53 +01:00
|
|
|
foreach src : files([
|
|
|
|
|
'Architecture.xml',
|
|
|
|
|
'Introduction.xml'
|
|
|
|
|
])
|
|
|
|
|
name = fs.name(src)
|
|
|
|
|
publican_inputs += custom_target(
|
|
|
|
|
name,
|
|
|
|
|
command: [
|
|
|
|
|
xsltproc,
|
|
|
|
|
'-o', '@OUTPUT@',
|
2025-12-27 21:44:29 +02:00
|
|
|
'--stringparam', 'basedir', meson.current_build_dir() / 'html',
|
2025-10-28 00:36:53 +01:00
|
|
|
merge_mapcoords_xsl,
|
|
|
|
|
'@INPUT@',
|
|
|
|
|
],
|
2025-12-27 21:44:29 +02:00
|
|
|
input: src,
|
2025-10-28 00:36:53 +01:00
|
|
|
output: [name],
|
2025-12-27 21:44:29 +02:00
|
|
|
depends: publican_image_maps,
|
2025-10-28 00:36:53 +01:00
|
|
|
)
|
|
|
|
|
endforeach
|
|
|
|
|
|
Add Meson build
Meson is a next generation build system, simpler than Autotools and also faster
and more portable. Most importantly, it will make integrating ASan easier in
CI.
The goal is to maintain feature parity of the Meson build with the
Autotools build, until such time when we can drop the latter.
Add a script which generates the desired Doxygen configuration for our various
output formats and executes it using that configuration. This is not something
Meson can or should do.
Fixes: https://gitlab.freedesktop.org/wayland/wayland/issues/80
[daniels: Changed to bump version, use GitLab issues URL, remove header
checks not used in any code, remove pre-pkg-config Expat
support, added missing include paths to wayland-egl and
cpp-compile-test, added GitLab CI.
Bumped version, removed unnecessary pkg-config paths.]
[daniels: Properly install into mandir/man3 via some gross
paramaterisation, generate real stamp files.]
Pekka:
- squashed patches
- removed MAKEFLAGS from meson CI
- remove unused PACKAGE* defines
- fix up scanner dependency handling
- instead of host_scanner option, build wayland-scanner twice when cross-compiling
- changed .pc files to match more closely the autotools versions
- reorder doxygen man sources to reduce diff to autotools
- fix pkgconfig.generate syntax warnings (new in Meson)
- bump meson version to 0.47 for configure_file(copy) and run_command(check)
- move doc tool checks into doc/meson.build, needed in more places
- make all doc tools mandatory if building docs
- check dot and doxygen versions
- add build files under doc/publican
- reindent to match Weston Meson style
Simon:
- Remove install arg from configure_file
- Don't build wayland-scanner twice during cross-build
- Fix naming of the threads dependency
- Store tests in dict
- Add missing HAVE_* decls for functions
- Remove unused cc_native variable
- Make doxygen targets a dict
- Make dot_gv a dict
- Use dicts in man_pages
- Make decls use dicts
- Make generated_headers use dicts
- Align Meson version number with autotool's
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Signed-off-by: Simon Ser <contact@emersion.fr>
2018-04-23 14:29:16 +01:00
|
|
|
custom_target(
|
|
|
|
|
'Wayland-docbook-html',
|
|
|
|
|
command: [
|
|
|
|
|
xmlto,
|
2022-05-10 17:21:11 +02:00
|
|
|
'--stringparam', 'chunker.output.encoding=UTF-8',
|
Add Meson build
Meson is a next generation build system, simpler than Autotools and also faster
and more portable. Most importantly, it will make integrating ASan easier in
CI.
The goal is to maintain feature parity of the Meson build with the
Autotools build, until such time when we can drop the latter.
Add a script which generates the desired Doxygen configuration for our various
output formats and executes it using that configuration. This is not something
Meson can or should do.
Fixes: https://gitlab.freedesktop.org/wayland/wayland/issues/80
[daniels: Changed to bump version, use GitLab issues URL, remove header
checks not used in any code, remove pre-pkg-config Expat
support, added missing include paths to wayland-egl and
cpp-compile-test, added GitLab CI.
Bumped version, removed unnecessary pkg-config paths.]
[daniels: Properly install into mandir/man3 via some gross
paramaterisation, generate real stamp files.]
Pekka:
- squashed patches
- removed MAKEFLAGS from meson CI
- remove unused PACKAGE* defines
- fix up scanner dependency handling
- instead of host_scanner option, build wayland-scanner twice when cross-compiling
- changed .pc files to match more closely the autotools versions
- reorder doxygen man sources to reduce diff to autotools
- fix pkgconfig.generate syntax warnings (new in Meson)
- bump meson version to 0.47 for configure_file(copy) and run_command(check)
- move doc tool checks into doc/meson.build, needed in more places
- make all doc tools mandatory if building docs
- check dot and doxygen versions
- add build files under doc/publican
- reindent to match Weston Meson style
Simon:
- Remove install arg from configure_file
- Don't build wayland-scanner twice during cross-build
- Fix naming of the threads dependency
- Store tests in dict
- Add missing HAVE_* decls for functions
- Remove unused cc_native variable
- Make doxygen targets a dict
- Make dot_gv a dict
- Use dicts in man_pages
- Make decls use dicts
- Make generated_headers use dicts
- Align Meson version number with autotool's
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Signed-off-by: Simon Ser <contact@emersion.fr>
2018-04-23 14:29:16 +01:00
|
|
|
'--stringparam', 'chunk.section.depth=0',
|
|
|
|
|
'--stringparam', 'toc.section.depth=1',
|
2020-10-29 12:06:36 +00:00
|
|
|
'--stringparam', 'generate.consistent.ids=1',
|
Add Meson build
Meson is a next generation build system, simpler than Autotools and also faster
and more portable. Most importantly, it will make integrating ASan easier in
CI.
The goal is to maintain feature parity of the Meson build with the
Autotools build, until such time when we can drop the latter.
Add a script which generates the desired Doxygen configuration for our various
output formats and executes it using that configuration. This is not something
Meson can or should do.
Fixes: https://gitlab.freedesktop.org/wayland/wayland/issues/80
[daniels: Changed to bump version, use GitLab issues URL, remove header
checks not used in any code, remove pre-pkg-config Expat
support, added missing include paths to wayland-egl and
cpp-compile-test, added GitLab CI.
Bumped version, removed unnecessary pkg-config paths.]
[daniels: Properly install into mandir/man3 via some gross
paramaterisation, generate real stamp files.]
Pekka:
- squashed patches
- removed MAKEFLAGS from meson CI
- remove unused PACKAGE* defines
- fix up scanner dependency handling
- instead of host_scanner option, build wayland-scanner twice when cross-compiling
- changed .pc files to match more closely the autotools versions
- reorder doxygen man sources to reduce diff to autotools
- fix pkgconfig.generate syntax warnings (new in Meson)
- bump meson version to 0.47 for configure_file(copy) and run_command(check)
- move doc tool checks into doc/meson.build, needed in more places
- make all doc tools mandatory if building docs
- check dot and doxygen versions
- add build files under doc/publican
- reindent to match Weston Meson style
Simon:
- Remove install arg from configure_file
- Don't build wayland-scanner twice during cross-build
- Fix naming of the threads dependency
- Store tests in dict
- Add missing HAVE_* decls for functions
- Remove unused cc_native variable
- Make doxygen targets a dict
- Make dot_gv a dict
- Use dicts in man_pages
- Make decls use dicts
- Make generated_headers use dicts
- Align Meson version number with autotool's
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Signed-off-by: Simon Ser <contact@emersion.fr>
2018-04-23 14:29:16 +01:00
|
|
|
'--stringparam', 'html.stylesheet=css/default.css',
|
|
|
|
|
'-o', '@OUTPUT@',
|
|
|
|
|
'html',
|
2025-10-28 00:36:53 +01:00
|
|
|
'@INPUT0@'
|
Add Meson build
Meson is a next generation build system, simpler than Autotools and also faster
and more portable. Most importantly, it will make integrating ASan easier in
CI.
The goal is to maintain feature parity of the Meson build with the
Autotools build, until such time when we can drop the latter.
Add a script which generates the desired Doxygen configuration for our various
output formats and executes it using that configuration. This is not something
Meson can or should do.
Fixes: https://gitlab.freedesktop.org/wayland/wayland/issues/80
[daniels: Changed to bump version, use GitLab issues URL, remove header
checks not used in any code, remove pre-pkg-config Expat
support, added missing include paths to wayland-egl and
cpp-compile-test, added GitLab CI.
Bumped version, removed unnecessary pkg-config paths.]
[daniels: Properly install into mandir/man3 via some gross
paramaterisation, generate real stamp files.]
Pekka:
- squashed patches
- removed MAKEFLAGS from meson CI
- remove unused PACKAGE* defines
- fix up scanner dependency handling
- instead of host_scanner option, build wayland-scanner twice when cross-compiling
- changed .pc files to match more closely the autotools versions
- reorder doxygen man sources to reduce diff to autotools
- fix pkgconfig.generate syntax warnings (new in Meson)
- bump meson version to 0.47 for configure_file(copy) and run_command(check)
- move doc tool checks into doc/meson.build, needed in more places
- make all doc tools mandatory if building docs
- check dot and doxygen versions
- add build files under doc/publican
- reindent to match Weston Meson style
Simon:
- Remove install arg from configure_file
- Don't build wayland-scanner twice during cross-build
- Fix naming of the threads dependency
- Store tests in dict
- Add missing HAVE_* decls for functions
- Remove unused cc_native variable
- Make doxygen targets a dict
- Make dot_gv a dict
- Use dicts in man_pages
- Make decls use dicts
- Make generated_headers use dicts
- Align Meson version number with autotool's
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Signed-off-by: Simon Ser <contact@emersion.fr>
2018-04-23 14:29:16 +01:00
|
|
|
],
|
2025-10-28 00:36:53 +01:00
|
|
|
input: publican_inputs,
|
|
|
|
|
output: 'html',
|
Add Meson build
Meson is a next generation build system, simpler than Autotools and also faster
and more portable. Most importantly, it will make integrating ASan easier in
CI.
The goal is to maintain feature parity of the Meson build with the
Autotools build, until such time when we can drop the latter.
Add a script which generates the desired Doxygen configuration for our various
output formats and executes it using that configuration. This is not something
Meson can or should do.
Fixes: https://gitlab.freedesktop.org/wayland/wayland/issues/80
[daniels: Changed to bump version, use GitLab issues URL, remove header
checks not used in any code, remove pre-pkg-config Expat
support, added missing include paths to wayland-egl and
cpp-compile-test, added GitLab CI.
Bumped version, removed unnecessary pkg-config paths.]
[daniels: Properly install into mandir/man3 via some gross
paramaterisation, generate real stamp files.]
Pekka:
- squashed patches
- removed MAKEFLAGS from meson CI
- remove unused PACKAGE* defines
- fix up scanner dependency handling
- instead of host_scanner option, build wayland-scanner twice when cross-compiling
- changed .pc files to match more closely the autotools versions
- reorder doxygen man sources to reduce diff to autotools
- fix pkgconfig.generate syntax warnings (new in Meson)
- bump meson version to 0.47 for configure_file(copy) and run_command(check)
- move doc tool checks into doc/meson.build, needed in more places
- make all doc tools mandatory if building docs
- check dot and doxygen versions
- add build files under doc/publican
- reindent to match Weston Meson style
Simon:
- Remove install arg from configure_file
- Don't build wayland-scanner twice during cross-build
- Fix naming of the threads dependency
- Store tests in dict
- Add missing HAVE_* decls for functions
- Remove unused cc_native variable
- Make doxygen targets a dict
- Make dot_gv a dict
- Use dicts in man_pages
- Make decls use dicts
- Make generated_headers use dicts
- Align Meson version number with autotool's
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Signed-off-by: Simon Ser <contact@emersion.fr>
2018-04-23 14:29:16 +01:00
|
|
|
build_by_default: true,
|
|
|
|
|
install: true,
|
2025-10-28 00:36:53 +01:00
|
|
|
install_dir: publican_install_prefix,
|
Add Meson build
Meson is a next generation build system, simpler than Autotools and also faster
and more portable. Most importantly, it will make integrating ASan easier in
CI.
The goal is to maintain feature parity of the Meson build with the
Autotools build, until such time when we can drop the latter.
Add a script which generates the desired Doxygen configuration for our various
output formats and executes it using that configuration. This is not something
Meson can or should do.
Fixes: https://gitlab.freedesktop.org/wayland/wayland/issues/80
[daniels: Changed to bump version, use GitLab issues URL, remove header
checks not used in any code, remove pre-pkg-config Expat
support, added missing include paths to wayland-egl and
cpp-compile-test, added GitLab CI.
Bumped version, removed unnecessary pkg-config paths.]
[daniels: Properly install into mandir/man3 via some gross
paramaterisation, generate real stamp files.]
Pekka:
- squashed patches
- removed MAKEFLAGS from meson CI
- remove unused PACKAGE* defines
- fix up scanner dependency handling
- instead of host_scanner option, build wayland-scanner twice when cross-compiling
- changed .pc files to match more closely the autotools versions
- reorder doxygen man sources to reduce diff to autotools
- fix pkgconfig.generate syntax warnings (new in Meson)
- bump meson version to 0.47 for configure_file(copy) and run_command(check)
- move doc tool checks into doc/meson.build, needed in more places
- make all doc tools mandatory if building docs
- check dot and doxygen versions
- add build files under doc/publican
- reindent to match Weston Meson style
Simon:
- Remove install arg from configure_file
- Don't build wayland-scanner twice during cross-build
- Fix naming of the threads dependency
- Store tests in dict
- Add missing HAVE_* decls for functions
- Remove unused cc_native variable
- Make doxygen targets a dict
- Make dot_gv a dict
- Use dicts in man_pages
- Make decls use dicts
- Make generated_headers use dicts
- Align Meson version number with autotool's
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Signed-off-by: Simon Ser <contact@emersion.fr>
2018-04-23 14:29:16 +01:00
|
|
|
)
|