Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Planned Release Check 0.13.0

* configure: optional build documentation
Issue #206 (GitHub)

* missing <unistd.h> in some files
Issue #196 and Issue #186 (GitHub)

Expand Down
35 changes: 29 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Copy link
Copy Markdown
Contributor

@nmeum nmeum Oct 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this check for tex instead of makeinfo? The issue you referenced also mentions makeinfo, not tex. Your doc makefile also doesn't seem to call tex explicitly instead it uses the implicit GNU make rule which uses makeinfo.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing this out, and thanks for your fix in #231

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
Expand Down Expand Up @@ -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 "=========================================="
6 changes: 3 additions & 3 deletions travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down