dovecot_moduledir="$libdir/dovecot"
DC_DOVECOT_MODULEDIR
-DOVECOT_CHECK_PYTHON_VENV
-
AC_ARG_WITH(docs,
AS_HELP_STRING([--with-docs], [Install documentation (default)]),
if test x$withval = xno; then
AC_PROG_CXX # lucene plugin needs this
AC_CHECK_TOOL([FLEX],[flex],[:])
AC_CHECK_TOOL([BISON],[bison],[:])
-AC_PATH_TOOL([WGET], [wget], [missing])
+AM_MISSING_PROG([WGET], [wget])
+
AS_IF([test "$BISON" = ":" && test ! -e "$srcdir/src/lib/event-filter-parser.h"],
AC_MSG_ERROR([Bison is required when building from git])
])
solr-schema-7.7.0.xml \
solr-config-7.7.0.xml
+DOCS_URL=https://doc.dovecot.org/assets/3.0/docs.txz
+MAN_URL=https://doc.dovecot.org/assets/3.0/man.txz
+
AM_V_Q = $(am__v_Q_$(V))
am__v_Q_ = $(am__v_Q_$(AM_DEFAULT_VERBOSITY))
am__v_Q_0 = -q
am__v_Q_1 =
+AM_V_DL_DOCS = $(am__v_DL_DOCS_$(V))
+am__v_DL_DOCS_ = $(am__v_DL_DOCS_$(AM_DEFAULT_VERBOSITY))
+am__v_DL_DOCS_0 = @echo " DL " $(DOCS_URL);
+am__v_DL_DOCS_1 =
+
+AM_V_DL_MAN = $(am__v_DL_MAN_$(V))
+am__v_DL_MAN_ = $(am__v_DL_MAN_$(AM_DEFAULT_VERBOSITY))
+am__v_DL_MAN_0 = @echo " DL " $(MAN_URL);
+am__v_DL_MAN_1 =
+
if INSTALL_DOCS
SUBDIRS += man
DOCDIRS += html
+endif
-if HAVE_VENV
-BUILT_SOURCES = html mans
-extra_dist_extra += html man
-documentation_sources = $(top_srcdir)/doc/documentation-main
-
-.PHONY: mans prep-mans
-
-# extracting the documentation tarball from github yields the
-# "documentation-main" directory
-documentation-main:
- $(AM_V_GEN)$(WGET) $(AM_V_Q) -O - \
- https://github.com/dovecot/documentation/archive/refs/heads/main.tar.gz | \
- gunzip | $(am__untar)
-
-$(documentation_sources)/requirements.txt: documentation-main
-
-venv: $(documentation_sources)/requirements.txt
- $(AM_V_GEN)$(PYTHON) -m venv venv && \
- venv/bin/pip $(AM_V_Q) install wheel && \
- venv/bin/pip $(AM_V_Q) install -r "$(documentation_sources)/requirements.txt"
-
-prep-mans: venv
- -$(AM_V_at)$(MAKE) -C $(documentation_sources)/source/man \
- V=$(V) pkgsysconfdir=$(sysconfdir) \
- rundir=$(rundir) \
- pkglibexecdir=$(pkglibexecdir) \
- AM_DEFAULT_VERBOSITY=$(AM_DEFAULT_VERBOSITY)
-
-man/dovecot.1:
- $(MAKE) prep-mans
+extra_dist_extra += html
-mans: man/dovecot.1
- $(AM_V_GEN)test -f man/dovecot.1 || venv/bin/python -msphinx $(AM_V_Q) \
- -b man $(documentation_sources)/source man
+html-dl:
+ $(AM_V_DL_DOCS)$(WGET) $(AM_V_Q) -O- $(DOCS_URL) | xz -d | $(am__untar)
-html: man/dovecot.1
- $(AM_V_GEN)test -f html/index.html || venv/bin/python -msphinx $(AM_V_Q) \
- -b html $(documentation_sources)/source html
+man-dl:
+ $(AM_V_DL_MAN)$(WGET) $(AM_V_Q) -O- $(MAN_URL) | xz -d | $(am__untar)
-else # if HAVE_VENV
+all-local: html
-html:
- if [ ! -e html/index.html ]; then \
- echo "Building html documentation needs python installed"; \
+html-local:
+ $(AM_V_at)if [ ! -e html/index.html ]; then \
+ $(MAKE) html-dl; \
fi
-
-mans:
- if [ ! -e man/dovecot.1 ]; then \
- echo "Building manpages needs python installed"; \
+ $(AM_V_at)if [ ! -e man/dovecot.1 ]; then \
+ $(MAKE) man-dl; \
fi
-endif # if HAVE_VENV
-
-# explicit hook for make dist
-# remove all the build artifacts before packaging
-# NB: this is ran too late to build anything here.
-dist-hook:
- -rm -rf $(distdir)/html/.buildinfo
- -rm -rf $(distdir)/html/.doctrees
- -rm -rf $(distdir)/html/_sources
- -rm -rf $(distdir)/html/objects.inv
- -rm -rf $(distdir)/man/.doctrees
-
-clean-local:
- -rm -rf venv
- -rm -rf $(documentation_sources)
-
-rebuild:
- -rm -rf html
- $(MAKE) -C man $@
-
-distclean-local: clean-local rebuild
-
-maintainer-clean: distclean-local
-
-endif # if INSTALL_DOCS
-
install-data-local:
$(MKDIR_P) $(DESTDIR)$(docdir); \
for dir in $(DOCDIRS); do \
+++ /dev/null
-dnl Define DOVECOT_CHECK_PYTHON_VENV function to be used in configure.ac
-dnl Provide HAVE_VENV if we can access a virtual python environment,
-dnl which might be necessary to build the documentation if so desired.
-
-AC_DEFUN([DOVECOT_CHECK_PYTHON_VENV], [
- AM_PATH_PYTHON([3.6],,[:])
- AS_IF([test "${PYTHON}" != ":"], [
- AX_PYTHON_MODULE([venv],[])
- ])
- AM_CONDITIONAL([HAVE_VENV], [test "x${HAVE_PYMOD_VENV}" = "xyes"])
-])