From 8ca1f79a73c374e9e9172937938947584c921659 Mon Sep 17 00:00:00 2001 From: Branden Archer Date: Mon, 19 Aug 2019 20:32:35 +0200 Subject: [PATCH 1/4] configure: optional build documentation Fix issue https://github.com/libcheck/check/issues/206 Applied an uncommitted patch by Branden Archer. https://sourceforge.net/p/check/bugs/101/ Signed-off-by: Mikko Johannes Koivunalho --- Makefile.am | 8 +++++++- configure.ac | 28 ++++++++++++++++++++++------ 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/Makefile.am b/Makefile.am index fd714324..f04c0e0d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,7 +2,13 @@ ## run tests after everything else -SUBDIRS = lib src doc . checkmk tests +if MAKE_DOCS +OPTIONAL_DOC_TARGET = doc +else +OPTIONAL_DOC_TARGET = +endif + +SUBDIRS = lib src $(OPTIONAL_DOC_TARGET) . checkmk tests ## FIXME: maybe we don't need this line diff --git a/configure.ac b/configure.ac index 47c36752..7889b324 100644 --- a/configure.ac +++ b/configure.ac @@ -72,6 +72,15 @@ AC_HELP_STRING([--enable-timeout-tests], *) AC_MSG_ERROR(bad value ${enableval} for --enable-timeout-tests) ;; esac], [enable_timeout_tests=true ]) +AC_ARG_ENABLE(build-docs, +AC_HELP_STRING([--enable-build-docs], + [turn on building documentation @<:@default=yes@:>@]), +[case "${enableval}" in + yes) enable_build_docs=true ;; + no) enable_build_docs=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-build-docs) ;; +esac], [enable_build_docs=true ]) + AM_CONDITIONAL(NO_TIMEOUT_TESTS, test x"$enable_timeout_tests" = "xfalse") AC_ARG_ENABLE(subunit, @@ -171,12 +180,19 @@ esac AC_CHECK_PROGS(GCOV, gcov, false) AC_CHECK_PROGS(LCOV, lcov, false) AC_CHECK_PROGS(GENHTML, genhtml, false) -AC_CHECK_PROGS(TEX, tex, false) -if test "$TEX" = "false"; then - # Make it [somewhat] clear to maintainers that tex is missing. Not an error - # though because 'make install' (which users need) does not build the docs - # anyway. - AC_MSG_WARN(tex not installed: cannot rebuild HTML documentation.) + +if test "xtrue" = x"$enable_build_docs"; then + AC_CHECK_PROGS(TEX, tex, false) + if test "$TEX" = "false"; then + # Make it [somewhat] clear to maintainers that tex is missing. Not an error + # though because 'make install' (which users need) does not build the docs + # anyway. + AC_MSG_WARN(tex not installed: cannot rebuild HTML documentation.) + fi + + AM_CONDITIONAL(MAKE_DOCS, [test x"$TEX" != "xfalse"]) +else + AM_CONDITIONAL(MAKE_DOCS, [false]) fi AC_CHECK_PROGS(FILTERDIFF, filterdiff, false) if test "$FILTERDIFF" = "false"; then From 42bf6fd291211f765aa4158a8c498ede61fe402d Mon Sep 17 00:00:00 2001 From: Mikko Johannes Koivunalho Date: Thu, 29 Aug 2019 16:52:52 +0200 Subject: [PATCH 2/4] configure: optional build documentation, output Add more output when running `./configure`. Signed-off-by: Mikko Johannes Koivunalho --- configure.ac | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configure.ac b/configure.ac index 7889b324..c4d439dd 100644 --- a/configure.ac +++ b/configure.ac @@ -449,4 +449,11 @@ else fi echo "POSIX regular expressions ............ $result" +if test "xtrue" = x"$enable_build_docs"; then + result="yes" +else + result="no" +fi +echo "build docs ........................... $result" + echo "==========================================" From 4842075d10411e92c1f3fa12b10aafc55c834fed Mon Sep 17 00:00:00 2001 From: Mikko Johannes Koivunalho Date: Thu, 29 Aug 2019 16:57:52 +0200 Subject: [PATCH 3/4] configure: optional build documentation, travis Tweak Travis build to support the new `./configure` switch. Signed-off-by: Mikko Johannes Koivunalho --- travis.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/travis.sh b/travis.sh index 88fd01b8..47a9baf0 100644 --- a/travis.sh +++ b/travis.sh @@ -38,11 +38,11 @@ fi if [ "${USE_CMAKE}" = 'NO' ] ; then autoreconf -i || exit 1 - ./configure ${EXTRA_ARGS} || exit 1 + ./configure ${EXTRA_ARGS} --disable-build-docs || exit 1 make || exit 1 - if [ ! -f doc/version.texi ]; then - echo "version.texi not generated"; + if [ -f doc/version.texi ]; then + echo "Documentation was generated (doc/version.texi), though disabled"; exit 1; fi From c4e5c3cbb8cdac49b0614533d60c5d1fe5da8456 Mon Sep 17 00:00:00 2001 From: Mikko Johannes Koivunalho Date: Tue, 20 Aug 2019 10:44:12 +0200 Subject: [PATCH 4/4] Add issue #206 to NEWS https://github.com/libcheck/check/issues/206 Signed-off-by: Mikko Johannes Koivunalho --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index f6f4fa7f..b660b072 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ Planned Release Check 0.13.0 +* configure: optional build documentation + Issue #206 (GitHub) + * missing in some files Issue #196 and Issue #186 (GitHub)