Commit graph

33 commits

Author SHA1 Message Date
Ralf Habacker
f74fdf06ad cmake: Fix race condition on creating docbook based files
With the previous implementation, race conditions could arise because a
generated intermediate file was used by multiple targets.

To fix the mentioned problem, the macro 'generate_docbook_file' has been
integrated into a in a new macro 'add_docbook' to simplify the dependency
chain and make it easier to use.

When using an xml template with the 'TEMPLATE' parameter, a separate
intermediate xml file is used for each generated output file to avoid
overwriting each other, which was the main cause of the described problem.

Due to the adaptation of the calling conventions it was necessary to
introduce the parameter 'MAN_CATEGORY'.

Fixes #381

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2022-03-04 09:18:01 +00:00
Jan Tojnar
2ac9a348f0 doc: Introduce XML catalog
This adds a nice way of loading the DTD files based on the identifier
in the DOCTYPE declaration, no matter where the DTDs are installed.
See also ‘XML catalog’ Wikipedia entry and update-xmlcatalog(8).
2022-02-21 14:01:20 +00:00
Ralf Habacker
673d48c7c9 cmake: fix for ninja phony cycle related configuring errors
A prefix has been added to the custom target names in docbook-related
macros to fix the reported error:

  ninja: error: build.ninja:xxx: multiple rules generate
  doc/dbus-xxx.1.html [-w dupbuild=err]

Fixes #377

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2022-02-17 14:12:09 +01:00
Ralf Habacker
a3937715ae cmake: drop obsolete dependencies for generated docbook source files
The docbook source files are already dependencies of the generated
docbook files.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2022-02-17 14:12:09 +01:00
Ralf Habacker
8d97452051 cmake: let macro docbook handle all requested formats in one call
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2022-02-17 14:12:09 +01:00
Ralf Habacker
4bb89044df cmake: in macro generate_docbook_file use easier to read parameter names
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2022-02-17 14:12:09 +01:00
Arnout Engelen
43e0188dbf
docs: generate reproducible ids
With this parameter, docbook will generate the same id's when generating the
same docs. This is helpful to get bit-by-bit 'reproducible' output, which
makes auditing the package easier.

Tested both the cmake output and the automake output
2020-11-06 14:52:48 +01:00
Ralf Habacker
eb6d4a1439 cmake: Add macro check_auto_option() as an addition to add_auto_option()
check_auto_option() checks the values given to an auto-option and prints
a fatal error in case of invalid combinations.
2020-06-10 18:13:47 +00:00
Ralf Habacker
ab404c5ffb cmake: rename tristateoption() to add_auto_option() and make signature compatible to option() 2020-06-10 18:13:47 +00:00
Ralf Habacker
6e8d75834e Add support to generate the api documentation in Qt help format
Qt help files are used by Qt Creator and KDevelop, for example, to support
the development of Qt-based applications and libraries.

Generating api documentation in Qt help format is controlled by two
user specific options named --enable-qt-help and --with-qchdir (autotools)
and -DENABLE_QT_HELP and -DINSTALL_QCH_DIR (cmake).
2020-04-29 15:23:23 +00:00
Ralf Habacker
a094728abd cmake: Don't build dbus.devhelp2 if Doxygen is disabled
Previously this would be attempted whenever xsltproc was found, but
would fail if Doxygen documentation was disabled.
2020-02-20 20:02:30 +01:00
Simon McVittie
339b94da6b cmake: Create all output directories for Doxygen
CI builds intermittently fail with

    error: Could not create output directory /.../doc/api/xml

or

    error: Could not create output directory /.../doc/api/man

Fixes: https://gitlab.freedesktop.org/dbus/dbus/issues/266
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-04-25 12:22:25 +01:00
Ralf Habacker
f04e611a46 Try to fix doxygen error on CI reporting "Output directory ... does not exist and cannot be created" 2019-03-13 10:52:01 +01:00
Ralf Habacker
22fb56cfb7 Create top level dir for generating doxygon files 2019-03-13 10:52:01 +01:00
Ralf Habacker
a710cdd5e3 Fix dependency chain for doc files generated from docbook source 2019-03-13 10:52:01 +01:00
Ralf Habacker
d32ae7082e Update doxygen doc only if an associated source or Doxyfile has been changed
Use doxygen.stamp as output for generating doxygen doc similar to
autotools.
2019-03-13 10:49:54 +01:00
Ralf Habacker
44973e372d Target devhelp2 does not require dependencies that have already been specified in dbus.devhelp2 2019-03-13 10:49:54 +01:00
Ralf Habacker
cea3a27ed3 Cleanup dbus.devhelp2 make target pathes
Use absolute paths to avoid confusion about where
the associated file is located.
2019-03-13 10:49:54 +01:00
Ralf Habacker
e840edec09 Add target devhelp2 only when xsltproc has been found
It doesn't make sense to add a make target if it can't be created.
2019-03-13 10:49:54 +01:00
Ralf Habacker
89847f7042 Make the output directory used by doxygen absolute to avoid dependency on a particular working directory 2019-03-13 10:49:54 +01:00
Ralf Habacker
760e30ec03 Do not let doxygen build man pages on Windows
This fixes an issue on gitlab CI not been able to create man page
output dir. Also man pages does not make sense on Windows.
2019-03-13 10:13:09 +01:00
Ralf Habacker
11eb34d86b cmake: generate and install doc for dbus-run-session 2019-03-13 08:56:59 +01:00
Ralf Habacker
9dc72c9fb8 cmake: install missing files to keep in sync with autotools builds 2019-03-13 08:56:59 +01:00
Ralf Habacker
2c96e94fea cmake: fix dtd installation dir 2019-03-13 08:56:59 +01:00
Ralf Habacker
2798e68776 Adjust indents of CMakeLists.txt files always to 4 spaces 2019-01-24 09:08:15 +01:00
Ralf Habacker
904fa97a1b Remove obsolete parameter in end... cmake keywords 2019-01-24 09:07:27 +01:00
Ralf Habacker
5972bbe382 Remove spaces between cmake command and opening bracket 2019-01-24 09:07:27 +01:00
Ralf Habacker
3927b1dd39 Use lower case cmake keywords in CMakeLists.txt files 2019-01-24 09:07:27 +01:00
Ralf Habacker
7dd83ba874 Replace tabs by 4 spaces in CMakeLists.txt files 2019-01-24 09:07:27 +01:00
Ralf Habacker
b641eddd6e Remove duplicated cmake variable definition
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2019-01-22 09:58:14 +01:00
Ralf Habacker
88331affd5 Install devhelp2 and api doc with cmake
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2019-01-22 09:58:08 +01:00
Ralf Habacker
d9fa5aee84 Generate documentation html index file from doc/index.html.in for autotools and cmake
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2019-01-22 09:57:57 +01:00
Ralf Habacker
3bf97922bd Move cmake related build system to top level
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2019-01-22 09:57:40 +01:00
Renamed from cmake/doc/CMakeLists.txt (Browse further)