Commit 05568860 authored by Thomas Haller's avatar Thomas Haller

gitlab-ci: allow enabling/disabling building documentation in "nm-ci-run.sh"

g-ir-scanner does not support building with clang, due to [1], [2], [3].

It triggers

    checking if /usr/bin/g-ir-scanner works... no (compiler failure -- check config.log)
    configure: error: introspection enabled but can't be used

with

    clang-7: error: unknown argument: '-fstack-clash-protection'

See also commit 99b92fd9, which adds thi configure
check.

Honor the environment variable WITH_DOCS to allow the caller to overwrite
the automatic detection that the script does.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=757934
[2] https://gitlab.gnome.org/GNOME/gobject-introspection/issues/150
[3] https://gitlab.gnome.org/GNOME/gobject-introspection/commit/c14d0372283abc1b857e38517e791447233e4d62
parent e4761a69
......@@ -5,6 +5,7 @@
# - CC
# - BUILD_TYPE
# - CFLAGS
# - WITH_DOCS
set -exv
......@@ -13,6 +14,20 @@ die() {
exit 1
}
_is_true() {
case "$1" in
1|y|yes|YES|Yes|on)
return 0
;;
0|n|no|NO|No|off)
return 1
;;
*)
die "not a boolean argument \"$1\""
;;
esac
}
###############################################################################
if [ "$BUILD_TYPE" == meson ]; then
......@@ -45,6 +60,14 @@ if [ "$CC" != gcc ]; then
_WITH_CRYPTO=nss
fi
if [ "$WITH_DOCS" != "" ]; then
if _is_true "$WITH_DOCS"; then
_WITH_DOCS="$_TRUE"
else
_WITH_DOCS="$_FALSE"
fi
fi
###############################################################################
_autotools_test_print_logs() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment