]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doc: Only build venv when needed
authorAki Tuomi <aki.tuomi@open-xchange.com>
Thu, 29 Sep 2022 08:52:12 +0000 (11:52 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 30 Sep 2022 08:47:39 +0000 (11:47 +0300)
doc/Makefile.am

index 16485c863a0d78f8318a25c70a7e8fc209c4ff1c..b7217db24f5e668666b5746938e3f4b3204a2901 100644 (file)
@@ -25,34 +25,39 @@ BUILT_SOURCES = html mans
 extra_dist_extra += html man
 documentation_sources = $(top_srcdir)/doc/documentation-main
 
-.NOTPARALLEL: html mans
+.PHONY: mans prep-mans
 
 # extracting the documentation tarball from github yields the
 # "documentation-main" directory
-$(documentation_sources)/requirements.txt:
+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:
+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)
 
-mans: venv prep-mans
+man/dovecot.1:
+       $(MAKE) prep-mans
+
+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: venv prep-mans
+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
+           -b html $(documentation_sources)/source html
 
 else # if HAVE_VENV