From 5275f262c87383bb9aa25053f9a29d20913f1f66 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Fri, 2 Aug 2019 15:41:12 +0200 Subject: [PATCH] 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 --- build/Makefile.asciidoc.inc | 5 ++++- configure.ac | 9 +++++++++ contrib/jenkins.sh | 2 +- 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