/daemon/lua/trust_anchors.lua
/depcomp
/distro/tests/*/.vagrant
+/doc/.doctrees
/doc/doxyxml
/doc/html
/doc/kresd.8
when:
- script_failure
+.test_nodep: &test_nodep
+ stage: test
+ except:
+ - master
+ dependencies: [] # do not download build artifacts
+ tags:
+ - docker
+
lint:pedantic:
stage: test # could be in build already, but let's not block the test stage if this fails
dependencies: [] # do not download build artifacts
- docker rmi $(docker images -f "dangling=true" -q)
doc:
- stage: test
- except:
- - master
+ <<: *test_nodep
script:
- - SPHINXFLAGS="-W" make doc
- dependencies: []
+ - meson build_doc -Ddoc=enabled
+ - ninja -C build_doc doc
artifacts:
expire_in: 1 hour
paths:
- - ./doc/*
- tags:
- - docker
+ - doc/html
deckard:
<<: *test_flaky
)
makedepends=(
'cmocka'
- 'doxygen'
'meson'
- 'python-sphinx'
- 'python-breathe'
'systemd-libs'
)
-Dc_args="$${CFLAGS}" \
-Dc_link_args="$${LDFLAGS}"
ninja -v -C build_deb
+ ninja -v -C build_deb doc
override_dh_auto_install:
DESTDIR="${PWD}/debian/tmp" ninja -v -C build_deb install
-Dc_link_args="%{?__global_ldflags}"
ninja-build -v -C build_rpm
+%if "x%{?rhel}" == "x"
+ninja-build -v -C build_rpm doc
+%endif
%check
meson test -C build_rpm
$ meson test -C build_test --no-suite postinstall
$ meson test -C build_test integration.serve_stale
+.. _build-html-doc:
+
+HTML Documentation
+------------------
+
+To check for documentation dependencies and allow its installation, use
+``-Ddoc=enabled``. The documentation doesn't build automatically. Instead,
+target ``doc`` must be called explicitly.
+
+.. code-block:: bash
+
+ $ meson build_doc -Ddoc=enabled
+ $ ninja -C build_doc doc
+
Tarball
-------
* ``--prefix=/usr`` to customize
prefix, other directories can be set in a similar fashion, see ``meson setup
--help``
-* ``-Ddoc=enabled`` for offline html documentation
+* ``-Ddoc=enabled`` for offline html documentation (see :ref:`build-html-doc`)
* ``-Dinstall_kresd_conf=enabled`` to install default config file
* ``-Dclient=enabled`` to force build of kresc
* ``-Dunit_tests=enabled`` to force build of unit tests
install_man(man_kresd)
-build_doc = get_option('doc').enabled() # NOTE 'auto' unsupported
-if build_doc # doxygen + html docs
+# html documentation
+if get_option('doc').enabled()
message('--- doc dependencies ---')
doxygen = find_program('doxygen')
sphinx_build = find_program('sphinx-build-3', required: false)
endif
message('------------------------')
- # create doxygen in source dir
- doc_doxyxml = custom_target(
- 'doxyxml doc',
- command: [
- '../scripts/doc-doxyxml.sh',
- meson.current_source_dir(),
- ],
- output: 'doxygen',
- build_always_stale: true,
- build_by_default: true,
- )
-
- # create html docs in build dir
- doc = custom_target(
- 'html doc',
- command: [
- sphinx_build,
- '-W',
- '-b', 'html',
- '-d', '.doctrees',
- meson.current_source_dir(),
- '@OUTPUT@',
- ],
- output: 'html',
- build_always_stale: true,
- build_by_default: true,
- depends: doc_doxyxml,
- )
-
# install html docs
install_subdir(
- join_paths(meson.current_build_dir(), 'html'),
+ join_paths(meson.current_source_dir(), 'html'),
install_dir: doc_dir,
)
endif
+
+make_doc = find_program('../scripts/make-doc.sh')
+run_target(
+ 'doc',
+ command: make_doc,
+)
s_managed_ta = managed_ta ? 'enabled' : 'disabled'
s_systemd_socket = libsystemd.found() ? 'enabled' : 'disabled'
s_build_client = build_client ? 'enabled' : 'disabled'
-s_build_doc = build_doc ? 'enabled' : 'disabled'
-s_build_postinstall_tests = build_postinstall_tests ? 'enabled' : 'disabled'
s_build_unit_tests = build_unit_tests ? 'enabled' : 'disabled'
+s_build_postinstall_tests = build_postinstall_tests ? 'enabled' : 'disabled'
s_install_kresd_conf = install_kresd_conf ? 'enabled' : 'disabled'
message('''
optional components
client: @0@'''.format(s_build_client) + '''
- doc: @0@'''.format(s_build_doc) + '''
unit_tests: @0@'''.format(s_build_unit_tests) + '''
postinstall_tests: @0@'''.format(s_build_postinstall_tests) + '''
'doc',
type: 'feature',
value: 'disabled',
- description: 'build html documentation',
+ description: 'html documentation dependencies and installation',
)
option(
+++ /dev/null
-#!/bin/bash
-set -o errexit -o nounset
-
-cd $1
-doxygen
--- /dev/null
+#!/bin/bash
+cd "$(dirname ${0})/.."
+
+pushd doc
+doxygen
+popd
+
+SPHINX=$(command -v sphinx-build-3)
+if [ $? -ne 0 ]; then
+ SPHINX=$(command -v sphinx-build)
+fi
+
+set -o errexit -o nounset
+
+${SPHINX} -W -b html -d doc/.doctrees doc doc/html