aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2019-08-02 15:41:12 +0200
committerlaforge <laforge@gnumonks.org>2019-08-05 17:50:35 +0000
commit5275f262c87383bb9aa25053f9a29d20913f1f66 (patch)
treea9016ad243ac823a0f2ea6819dce9e54f5fa5b03
parent2d5d6c54e85c2fef4d7b59cc0b88caa42ec38e4d (diff)
Makefile.asciidoc.inc: warnings check not default
Only check for asciidoc warnings in "make check" if ASCIIDOC_WARNINGS_CHECK is set. Enable it in jenkins.sh by using the new ./configure --enable-asciidoc-warnings-check parameter (similar to --enable-werror in other Osmocom projects' configure.ac files). Related: OS#4140 Change-Id: Iac993a0d1b17205397a1f1ef1a7bd3f9df739e36
-rw-r--r--build/Makefile.asciidoc.inc5
-rw-r--r--configure.ac9
-rwxr-xr-xcontrib/jenkins.sh2
3 files changed, 14 insertions, 2 deletions
diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc
index 77f3b1d..7cb660f 100644
--- a/build/Makefile.asciidoc.inc
+++ b/build/Makefile.asciidoc.inc
@@ -75,7 +75,10 @@ $(ASCIIDOC_PDF): %.pdf: %.adoc %-docinfo.xml \
TEXINPUTS="$(OSMO_GSM_MANUALS_DIR)" \
a2x -vv $(A2X_OPTS) $(notdir $<)
-check: $(ASCIIDOC_CHECKS)
+check:
+ if [ -n "$$ASCIIDOC_WARNINGS_CHECK" ]; then \
+ $(MAKE) $(ASCIIDOC_CHECKS); \
+ fi
$(ASCIIDOC_CHECKS): %.check: %.adoc %-docinfo.xml \
$(ASCIIDOCSTYLE) \
diff --git a/configure.ac b/configure.ac
index 9858af6..1017e9c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,6 +28,15 @@ then
AC_MSG_ERROR("missing dependencies!")
fi
+# Asciidoc warnings check (OS#4140)
+AC_ARG_ENABLE(asciidoc_warnings_check,
+ [AS_HELP_STRING(
+ [--enable-asciidoc-warnings-check],
+ [Fail the build if asciidoc prints any warnings]
+ )],
+ [asciidoc_warnings_check=$enableval], [asciidoc_warnings_check="no"])
+AM_CONDITIONAL([ASCIIDOC_WARNINGS_CHECK], [test x"$asciidoc_warnings_check" = x"yes"])
+
AC_OUTPUT(
osmo-gsm-manuals.pc
Makefile
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index 0c40e2f..cf709b2 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -12,7 +12,7 @@ fi
osmo-clean-workspace.sh
autoreconf -fi
-./configure
+./configure --enable-asciidoc-warnings-check
$MAKE $PARALLEL_MAKE
$MAKE $PARALLEL_MAKE check
$MAKE $PARALLEL_MAKE distcheck