[master] e551669 Make rst2man mandatory
Federico G. Schwindt
fgsch at lodoss.net
Wed Feb 26 15:25:05 CET 2014
commit e5516699439d560f5df326a55a427b3a9f2bdce5
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Wed Feb 26 14:20:00 2014 +0000
Make rst2man mandatory
This simplifies the autofoo magic and fixes the manpage installation
on the dist tarball when rst2man was not installed.
diff --git a/Makefile.am b/Makefile.am
index 389be99..7624ec5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = include lib bin etc doc redhat
+SUBDIRS = include lib bin etc doc man redhat
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = varnishapi.pc
@@ -20,16 +20,6 @@ DISTCHECK_CONFIGURE_FLAGS = \
install-data-local:
$(install_sh) -d -m 0755 $(DESTDIR)$(localstatedir)/varnish
-if HAVE_RST2MAN
-SUBDIRS += man
-else
-dist-hook:
- @echo "========================================"
- @echo "You need rst2man installed to make dist"
- @echo "========================================"
- @false
-endif
-
distcheck-hook:
V="@PACKAGE_VERSION@" ; \
V="$${V%%-*}" ; \
diff --git a/configure.ac b/configure.ac
index 5c46de8..6f43695 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,15 +50,15 @@ CC="$PTHREAD_CC"
AC_PROG_INSTALL
AC_PROG_MAKE_SET
+
AC_ARG_WITH([rst2man],
- AS_HELP_STRING([--with-rst2man=PATH],
- [Location of rst2man (auto)]),
- [RST2MAN="$withval"],
- [AC_CHECK_PROGS(RST2MAN, [rst2man rst2man.py], "no")
- if test "x$RST2MAN" = "xno"; then
- AC_MSG_WARN([rst2man not found - not building man pages])
- fi])
-AM_CONDITIONAL(HAVE_RST2MAN,[test "x$RST2MAN" != "xno"])
+ AS_HELP_STRING([--with-rst2man=PATH], [Location of rst2man (auto)]),
+ [RST2MAN="$withval"],
+ AC_CHECK_PROGS(RST2MAN, [rst2man rst2man.py], []))
+if test -z "$RST2MAN"; then
+ AC_MSG_ERROR(
+ [rst2man is needed to build Varnish, please install python-docutils.])
+fi
AC_ARG_WITH([rst2html],
AS_HELP_STRING([--with-rst2html=PATH],
diff --git a/lib/libvarnishapi/Makefile.am b/lib/libvarnishapi/Makefile.am
index 9c96d39..f0a23fa 100644
--- a/lib/libvarnishapi/Makefile.am
+++ b/lib/libvarnishapi/Makefile.am
@@ -73,10 +73,8 @@ vsl2rst_SOURCES = \
$(top_srcdir)/include/tbl/vsl_tags.h \
$(top_srcdir)/include/tbl/vsl_tags_http.h
-if HAVE_RST2MAN
vsl-tags.rst: vsl2rst
./vsl2rst > $@
-endif
vxp_fixed_token.c vxp_tokens.h: \
$(srcdir)/generate.py
diff --git a/lib/libvmod_std/Makefile.am b/lib/libvmod_std/Makefile.am
index cd8aebf..8967bf5 100644
--- a/lib/libvmod_std/Makefile.am
+++ b/lib/libvmod_std/Makefile.am
@@ -38,11 +38,4 @@ CLEANFILES = $(builddir)/vcc_if.c $(builddir)/vcc_if.h \
$(builddir)/vmod_std.man.rst
vmod_std.3: $(top_srcdir)/doc/sphinx/reference/vmod_std.rst
-if HAVE_RST2MAN
${RST2MAN} $? $@
-else
- @echo "========================================"
- @echo "You need rst2man installed to make dist"
- @echo "========================================"
- @false
-endif
diff --git a/man/Makefile.am b/man/Makefile.am
index 3321a2f..9343063 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -1,8 +1,6 @@
#
-if HAVE_RST2MAN
noinst_PROGRAMS = vsc2rst
-endif
vsc2rst_SOURCES = vsc2rst.c \
$(top_srcdir)/include/tbl/vsc_fields.h
More information about the varnish-commit
mailing list