Mailing List Archive

[master] 970c59eda Revert "Revert "Only build manual pages in maintainer mode""
commit 970c59edac07ccdb68c1ae13d94516ab8ea8fdfa
Author: Dridi Boukelmoune <dridi.boukelmoune@gmail.com>
Date: Tue Jun 16 18:00:31 2020 +0200

Revert "Revert "Only build manual pages in maintainer mode""

This brings back commit cc42bd31af078b8d0a2532d3744d2e662b16e422:

When we release a dist archive, it comes with the documentation but
since some of it is generated by programs 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 documentation
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
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit