diff options
author | Thomas Haller <thaller@redhat.com> | 2019-02-05 16:06:02 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-02-07 17:31:31 +0100 |
commit | 389197fa8126aabd1378af3ee6f0a33db4ef2dce (patch) | |
tree | 510cdcc2c6a554cb30993149c16abb27f83f7594 | |
parent | 6505a781cf2da33901d0854e78e196999aafa4d7 (diff) | |
download | NetworkManager-389197fa8126aabd1378af3ee6f0a33db4ef2dce.tar.gz |
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 99b92fd9920372e57bfe3a624b29915ca3335d99, which adds this 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
-rwxr-xr-x | contrib/scripts/nm-ci-run.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/contrib/scripts/nm-ci-run.sh b/contrib/scripts/nm-ci-run.sh index 4ac5fd9684..188d631e55 100755 --- a/contrib/scripts/nm-ci-run.sh +++ b/contrib/scripts/nm-ci-run.sh @@ -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() { |