Commit c7087ebc authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

Fix make distcheck

This fix moves the man page destination to the src directory, where all
its dependencies (including transitive dependencies) live. A phony `vcc`
target was also added to make the dependency graph cleaner. Since the
`vmodtool` generates 4 files from a single vcc file, an abstract target
makes things a lot easier.

Regarding `rst2man`, since the `make` build fails if you don't have it,
there's no point in treating it as a warning in `autoconf`. It's only
more complexity and confusion.
parent 2285f10e
......@@ -8,19 +8,3 @@ DISTCHECK_CONFIGURE_FLAGS = \
EXTRA_DIST = README.rst LICENSE vmod-example.spec debian
doc_DATA = README.rst LICENSE
dist_man_MANS = vmod_example.3
MAINTAINERCLEANFILES = $(dist_man_MANS)
vmod_example.3: src/vmod_example.man.rst
%.1 %.2 %.3 %.4 %.5 %.6 %.7 %.8 %.9:
if HAVE_RST2MAN
${RST2MAN} $< $@
else
@echo "========================================"
@echo "You need rst2man installed to make dist"
@echo "========================================"
@false
endif
......@@ -26,9 +26,8 @@ AC_PROG_MAKE_SET
# Check for rst utilities
AC_CHECK_PROGS(RST2MAN, [rst2man rst2man.py], "no")
if test "x$RST2MAN" = "xno"; then
AC_MSG_WARN([rst2man not found - not building man pages])
AC_MSG_ERROR([rst2man not found - cannot build man pages])
fi
AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" != "xno"])
# Checks for header files.
AC_HEADER_STDC
......
......@@ -12,15 +12,19 @@ nodist_libvmod_example_la_SOURCES = \
vcc_if.c \
vcc_if.h
vmod_example.lo: vcc_if.c vcc_if.h
dist_man_MANS = vmod_example.3
vcc_if.c: vcc_if.h
vmod_example.3: vmod_example.man.rst
${RST2MAN} $< $@
vcc_if.h: @VMODTOOL@ $(top_srcdir)/src/vmod_example.vcc
vmod_example.lo vmod_example.man.rst: vcc
vcc: @VMODTOOL@ $(top_srcdir)/src/vmod_example.vcc
@VMODTOOL@ $(top_srcdir)/src/vmod_example.vcc
VMOD_TESTS = $(top_srcdir)/src/tests/*.vtc
.PHONY: $(VMOD_TESTS)
.PHONY: $(VMOD_TESTS) vcc
$(top_srcdir)/src/tests/*.vtc: libvmod_example.la
@VARNISHTEST@ -Dvarnishd=@VARNISHD@ -Dvmod_topbuild=$(abs_top_builddir) $@
......@@ -35,4 +39,5 @@ CLEANFILES = \
$(builddir)/vcc_if.c \
$(builddir)/vcc_if.h \
$(builddir)/vmod_example.rst \
$(builddir)/vmod_example.man.rst
$(builddir)/vmod_example.man.rst \
$(dist_man_MANS)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment