[master] cc42bd31a Only build manual pages in maintainer mode

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Jun 11 14:13:07 UTC 2020


commit cc42bd31af078b8d0a2532d3744d2e662b16e422
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Thu Jun 11 07:12:04 2020 +0200

    Only build manual pages in maintainer mode
    
    When we release a dist archive, it comes with the documentation but
    since some of it is generated by programs we end up it makes no real
    difference, and actually it makes things worse: rebuilding from the
    dist archive ends up with a rebuild of the documentation because some
    sources ended up being rebuilt. In other words, the documentation we
    ship is dead weight in the dist archive and doesn't reduce the number
    of build dependencies downstream.
    
    From now on, rst2man remains mandatory to build our manual pages but
    can safely be omitted by packaging scripts.

diff --git a/configure.ac b/configure.ac
index cbdeb59cf..ac1a3bdcf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,6 +37,7 @@ CC="$PTHREAD_CC"
 
 AC_PROG_INSTALL
 
+AM_COND_IF([MAINTAINER_MODE], [dnl
 AC_ARG_WITH([rst2man],
   AS_HELP_STRING([--with-rst2man=PATH], [Location of rst2man (auto)]),
   [RST2MAN="$withval"],
@@ -47,6 +48,7 @@ if test "x$RST2MAN" = "xno"; then
   AC_MSG_ERROR(
     [rst2man is needed to build Varnish, please install python3-docutils.])
 fi
+])dnl AM_COND_IF MAINTAINER_MODE
 
 AC_ARG_WITH([sphinx-build],
   AS_HELP_STRING([--with-sphinx-build=PATH], [Location of sphinx-build (auto)]),
diff --git a/man/Makefile.am b/man/Makefile.am
index f04a0647c..dd4b7771c 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -24,8 +24,9 @@ dist_man_MANS = \
 	vmod_unix.3 \
 	vmod_proxy.3
 
-CLEANFILES = $(dist_man_MANS)
+MAINTAINERCLEANFILES = $(dist_man_MANS)
 
+if MAINTAINER_MODE
 RST2ANY_FLAGS = --halt=2
 
 BUILD_MAN = $(AM_V_GEN) $(RST2MAN) $(RST2ANY_FLAGS)
@@ -120,3 +121,4 @@ vmod_proxy.3: $(top_builddir)/lib/libvmod_proxy/vmod_proxy.man.rst
 	$(BUILD_MAN) $? $@
 
 .NOPATH: $(dist_man_MANS)
+endif # MAINTAINER_MODE


More information about the varnish-commit mailing list