tinyproxy/docs/man5/Makefile.am
rofl0r 5ba958829f add configure option to disable manpage generation
using --disable-manpage-support it's finally possibly to disable
the formerly obligatory use of a2x to generate the manpage
documentation.

this is the final solution to the decade old problem that users need
to install the enormous asciidoc package to compile TINYproxy from
source, or otherwise get a build error, even though the vast majority
is only interested in the program itself.

solution was inspired by PR #179.

closes #179
closes #111

note that since 1.10.0 release the generated release tarball includes
the generated manpages too; in which case neither the use of a2x
nor --disable-manpage-support is required.
2020-08-12 00:15:45 +01:00

36 lines
597 B
Makefile

if HAVE_MANPAGE_INTEREST
MAN5_FILES = \
tinyproxy.conf.txt
endif
if HAVE_XMLLINT
A2X_ARGS = -d manpage -f manpage
else
A2X_ARGS = -d manpage -f manpage -L
endif
ASCIIDOCTOR_ARGS = -b manpage
man_MANS = \
$(MAN5_FILES:.txt=.5)
.txt.5:
if HAVE_A2X
$(AM_V_GEN) $(A2X) $(A2X_ARGS) $<
else
if HAVE_ASCIIDOCTOR
$(AM_V_GEN) $(ASCIIDOCTOR) $(ASCIIDOCTOR_ARGS) $<
else
@echo "*** a2x (asciidoc) or asciidoctor is required to regenerate $(@) ***"; exit 1;
endif
endif
MAINTAINERCLEANFILES = \
$(MAN5_FILES:.txt=.5)
CLEANFILES = \
$(MAN5_FILES:.txt=.xml)
EXTRA_DIST = \
$(MAN5_FILES:.txt=.5)