summaryrefslogtreecommitdiff
path: root/doc/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'doc/Makefile.am')
-rw-r--r--doc/Makefile.am47
1 files changed, 31 insertions, 16 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index e411f5f..1e4fcde 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -5,21 +5,28 @@
# packet encryption, packet authentication, and
# packet compression.
#
-# Copyright (C) 2002-2020 OpenVPN Inc <sales@openvpn.net>
+# Copyright (C) 2002-2021 OpenVPN Inc <sales@openvpn.net>
# Copyright (C) 2006-2012 Alon Bar-Lev <alon.barlev@gmail.com>
#
-MAINTAINERCLEANFILES = \
- $(srcdir)/Makefile.in
-
SUBDIRS = doxygen
+#
+# List of man and HTML pages we build when rst2man/rst2html is available
+#
+# NOTE: Remember to add source .rst files to $(dist_noinst_DATA) below
+# This could be automated with GNU Make, but we need BSD Make support
+#
+build_man_pages = openvpn.8 openvpn-examples.5
+build_html_pages = openvpn.8.html openvpn-examples.5.html
+
dist_doc_DATA = \
management-notes.txt gui-notes.txt
dist_noinst_DATA = \
README.plugins interactive-service-notes.rst \
openvpn.8.rst \
+ openvpn-examples.5.rst \
man-sections/advanced-options.rst \
man-sections/client-options.rst \
man-sections/connection-profiles.rst \
@@ -45,33 +52,41 @@ dist_noinst_DATA = \
man-sections/vpn-network-options.rst \
man-sections/windows-options.rst
-openvpn.8 :
+
+###### GENERIC RULES ##########
+
+SUFFIXES = .8.rst .8 .8.html .5.rst .5 .5.html
+
+MAINTAINERCLEANFILES = \
+ $(srcdir)/Makefile.in
+
+.8.rst.8 .5.rst.5 :
if HAVE_PYDOCUTILS
- $(RST2MAN) $(srcdir)/$@.rst > $@
+ $(RST2MAN) $< > $@
else
- @echo "Missing python-docutils - skipping man page generation"
+ @echo "Missing python-docutils - skipping man page generation ($@)"
endif
-openvpn.8.html:
+.8.rst.8.html .5.rst.5.html :
if HAVE_PYDOCUTILS
- $(RST2HTML) $(srcdir)/openvpn.8.rst > $@
+ $(RST2HTML) $< > $@
else
- @echo "Missing python-docutils - skipping man/html page generation"
+ @echo "Missing python-docutils - skipping html page generation ($@)"
endif
+
if HAVE_PYDOCUTILS
-dist_noinst_DATA += openvpn.8
-dist_html_DATA = openvpn.8.html
+dist_noinst_DATA += $(build_man_pages)
+dist_html_DATA = $(build_html_pages)
# Failsafe - do not delete these files unless we can recreate them
-CLEANFILES = \
- openvpn.8 openvpn.8.html
+CLEANFILES = $(build_man_pages) $(build_html_pages)
endif
if WIN32
else
-dist_man_MANS = openvpn.8
+dist_man_MANS = $(build_man_pages)
endif
-dist-hook : openvpn.8 openvpn.8.html
+dist-hook : $(build_man_pages) $(build_html_pages)