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/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) diff --git a/configure.ac b/configure.ac index 47c36752..c4d439dd 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 @@ -433,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 "==========================================" 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