From patchwork Wed Jun 30 08:06:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sommerseth X-Patchwork-Id: 1872 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director9.mail.ord1d.rsapps.net ([172.27.255.55]) by backend30.mail.ord1d.rsapps.net with LMTP id qO1fDwOz3GBtNQAAIUCqbw (envelope-from ) for ; Wed, 30 Jun 2021 14:08:03 -0400 Received: from proxy12.mail.iad3a.rsapps.net ([172.27.255.55]) by director9.mail.ord1d.rsapps.net with LMTP id MNz9DgOz3GDmQgAAalYnBA (envelope-from ) for ; Wed, 30 Jun 2021 14:08:03 -0400 Received: from smtp22.gate.iad3a ([172.27.255.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy12.mail.iad3a.rsapps.net with LMTPS id KGnuBwOz3GChcAAAh9K5Vw (envelope-from ) for ; Wed, 30 Jun 2021 14:08:03 -0400 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: X-Suspicious-Flag: YES X-Classification-ID: 18c7d910-d9ce-11eb-991d-5254005ae9fe-1-1 Received: from [216.105.38.7] ([216.105.38.7:45772] helo=lists.sourceforge.net) by smtp22.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 2B/EF-11384-DF2BCD06; Wed, 30 Jun 2021 14:07:57 -0400 Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.92.3) (envelope-from ) id 1lyec3-0007SO-EN; Wed, 30 Jun 2021 18:07:03 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1lyec2-0007SH-Le for openvpn-devel@lists.sourceforge.net; Wed, 30 Jun 2021 18:07:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=j8WXmkNE1hxJVozDmliYjdwytfT2YZJeXlqIZogiDus=; b=ioSNPvR4695DGDsEuG/AxATApw mrrYXybtodx11CyvMoRwPs7sDgIXsh0siZ8QCiPZqyvmKv5LwHhjOX5oHFdBRfSMsWF/Sm3AJmklk tfFi4XXKzP17opCJSRkv+j4nf/UduYDqjRvCCeyZeTWBlBsCkwlUJvlkuAfk63/JZ7OY=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=j8WXmkNE1hxJVozDmliYjdwytfT2YZJeXlqIZogiDus=; b=E oY/z0iVjsw5QObsH9Wevrl3CLO5IS5XAqvkHJkWHlEjzoiWGsJNx5bLJC/2VuyeotF7zyC+apmGgg UGlrgWF/1/gNnN/O/IpmxPtqFxLXkZ/CsB83DxhPF0/dnkqwt/FSFycYexOabwidQJcMv/OFRXLub r4ROt2yv+7JOfIZQ=; Received: from mx1.basenordic.cloud ([217.170.196.134]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1lyebx-00044m-Hd for openvpn-devel@lists.sourceforge.net; Wed, 30 Jun 2021 18:07:02 +0000 Received: from localhost (unknown [127.0.0.1]) by mx1.basenordic.cloud (Postfix) with ESMTP id A71D6E730; Wed, 30 Jun 2021 18:06:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sf.lists.topphemmelig.net; s=inouz9eefah2too5; t=1625076408; bh=j8WXmkNE1hxJVozDmliYjdwytfT2YZJeXlqIZogiDus=; h=From:To:Cc:Subject:Date:From; b=Nt8xsdrjrNtQj2U+j/q4stcEuaw2cjOtbfO+Q4QQXExhSXwYO6ZuaelLaHXhKfgcd Qb27WYv9nUwUpD5WcG+1mZLvnDO5m8O1PrYQn6aKcRDiE0+zEKyUJb01lH77p1Y48P RUo0b+DTFCfHY6YWq9W20epz8Oq5GJsUGEcNSe8g1nRFt5+MnP6iWsd2vkOEDCkKv+ qi973LcvVl/x8TNmITBeLs2HkgpAQQzxpxuX+AbFpSLV/cA8XkSX4VKOs/aTyZdZyP tnMZBxE88JG6ue2ZKA/WfMwwvIacAmNCWI6f39QnnxdvGt5X9meY5VLW+DCO356oC7 XI/lpKU6Ms4IA== Received: from mx1.basenordic.cloud ([127.0.0.1]) by localhost (mx1.basenordic.cloud [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gTa2ePPj-jFF; Wed, 30 Jun 2021 20:06:47 +0200 (CEST) Received: from xplorer.net (unknown [10.35.7.11]) by mx1.basenordic.cloud (Postfix) with ESMTP id 2F576E72F; Wed, 30 Jun 2021 20:06:47 +0200 (CEST) From: David Sommerseth To: openvpn-devel@lists.sourceforge.net Date: Wed, 30 Jun 2021 20:06:43 +0200 Message-Id: <20210630180643.139673-1-openvpn@sf.lists.topphemmelig.net> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: makefile.in] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-Headers-End: 1lyebx-00044m-Hd Subject: [Openvpn-devel] [PATCH] doc: Use generic rules for man/html generation X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Sommerseth Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox From: David Sommerseth Prior to this patch, the Makefile.am needs to be modified multiple places to add a new man or HTML page to be generated. Since it is not too often we modify this, it is easy to miss these finer details. This changes the man and HTML generator rules to be more generic and use variables as many places as possible. Also moved all the lines which should not need to be changed as much towards the bottom-half of the file. Signed-off-by: David Sommerseth --- doc/Makefile.am | 52 ++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index f5b08f9e..d22c9efa 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -9,11 +9,17 @@ # Copyright (C) 2006-2012 Alon Bar-Lev # -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 @@ -47,49 +53,41 @@ dist_noinst_DATA = \ man-sections/vpn-network-options.rst \ man-sections/windows-options.rst -openvpn.8 : -if HAVE_PYDOCUTILS - $(RST2MAN) $(srcdir)/$@.rst > $@ -else - @echo "Missing python-docutils - skipping man page generation" -endif -openvpn-examples.5 : -if HAVE_PYDOCUTILS - $(RST2MAN) $(srcdir)/$@.rst > $@ -else - @echo "Missing python-docutils - skipping man page generation" -endif +###### GENERIC RULES ########## + +SUFFIXES = .8.rst .8 .8.html .5.rst .5 .5.html +MAINTAINERCLEANFILES = \ + $(srcdir)/Makefile.in -openvpn.8.html: +.8.rst.8 .5.rst.5 : if HAVE_PYDOCUTILS - $(RST2HTML) $(srcdir)/openvpn.8.rst > $@ + $(RST2MAN) $< > $@ else - @echo "Missing python-docutils - skipping man/html page generation" + @echo "Missing python-docutils - skipping man page generation ($@)" endif -openvpn-examples.5.html: +.8.rst.8.html .5.rst.5.html : if HAVE_PYDOCUTILS - $(RST2HTML) $(srcdir)/openvpn-examples.5.rst > $@ + $(RST2MAN) $< > $@ 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 openvpn-examples.5 -dist_html_DATA = openvpn.8.html openvpn-examples.5.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 openvpn-examples.5 openvpn-examples.5.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 openvpn-examples.5 openvpn-examples.5.html +dist-hook : $(build_man_pages) $(build_html_pages)