From patchwork Wed Jun 30 08:51:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sommerseth X-Patchwork-Id: 1873 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director11.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id CNIkLni93GCTIAAAIUCqbw (envelope-from ) for ; Wed, 30 Jun 2021 14:52:40 -0400 Received: from proxy9.mail.ord1d.rsapps.net ([172.30.191.6]) by director11.mail.ord1d.rsapps.net with LMTP id gJfsLXi93GDdYwAAvGGmqA (envelope-from ) for ; Wed, 30 Jun 2021 14:52:40 -0400 Received: from smtp5.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy9.mail.ord1d.rsapps.net with LMTPS id qP+iLXi93GA8JgAA7h+8OQ (envelope-from ) for ; Wed, 30 Jun 2021 14:52:40 -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: smtp5.gate.ord1d.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dkim=fail (signature verification failed) header.d=sf.lists.topphemmelig.net; dmarc=fail (p=none; dis=none) header.from=sf.lists.topphemmelig.net X-Suspicious-Flag: YES X-Classification-ID: 57d5ac80-d9d4-11eb-aacb-525400d73c44-1-1 Received: from [216.105.38.7] ([216.105.38.7:35566] helo=lists.sourceforge.net) by smtp5.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id A7/43-02540-77DBCD06; Wed, 30 Jun 2021 14:52:40 -0400 Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfJS-0000dO-3B; Wed, 30 Jun 2021 18:51:54 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyfJQ-0000dG-9l for openvpn-devel@lists.sourceforge.net; Wed, 30 Jun 2021 18:51:52 +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:References: In-Reply-To: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:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=9PkdEDA3dzcFiASP156vclE8MzTohZYPYMBHC0+KDWc=; b=HEVZGnwqn2PGRLNkDqQ5zrinVP OLvasgjep1o7ZJH7tfZE9H73ZhDRV/RpRve6zep2Oxif/6BqE/D8BFxn57FLuacsVxv41ePDSwvYz 6l3nKxTyZXm8twU+fhB3OZda7nP6nj784u4VJoMeQaZef0Wf7vDEIqMN0N4zaukYs2q4=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: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:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=9PkdEDA3dzcFiASP156vclE8MzTohZYPYMBHC0+KDWc=; b=AJnKFxaCSzI3ozz22pZlIYW4kx LJZ7NeUoc1WEh9ir3/3UpSF4nxWBHOPHpgLKJhWypCl3MiPmF/5/ZYDV3E/AzMAuJxJsKhKQ/P0O8 S7bs3fQmT2R08pdIr3AxGwBz0uCpiCS+C8rgaob7TnU4ABSlaWZ44x0S9Xrw5OmX4ngA=; 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 1lyfJO-0006qc-5R for openvpn-devel@lists.sourceforge.net; Wed, 30 Jun 2021 18:51:51 +0000 Received: from localhost (unknown [127.0.0.1]) by mx1.basenordic.cloud (Postfix) with ESMTP id E1098E730; Wed, 30 Jun 2021 18:51:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sf.lists.topphemmelig.net; s=inouz9eefah2too5; t=1625079097; bh=9PkdEDA3dzcFiASP156vclE8MzTohZYPYMBHC0+KDWc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kxmOK8v7ky/cfJhUV0N6+LugZTnt/apYzl6mR51eE8STye5bwnQ4bYZ4KJsuufC4g rM7YmrN/1KvwimEgsZ/hCAR3vu61Pjdh6N2UdEuh5nmn1Gz1CU0210MPE3v/US5x56 C2aiYntV1Tyif4/qR7CfK9JQqCoUS/qQ4I4N3E+1h4QT5UsjtvZISbYJVe5axn2EOl iVduQkosRJ6qB9hiQXbFE0DnDtpS6akGtFHdD7AHRHBIEWForVFZSwat0itBVsecgR if4qP0+oUuiVI7kxs0cpxsnZbhwGMPvQu07oYD03UFJ9soN4k8oul8cFrc+fxXNyZn S8nengjSmZrIA== 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 Ku0Gp6nbwa1S; Wed, 30 Jun 2021 20:51:37 +0200 (CEST) Received: from xplorer.net (unknown [10.35.7.11]) by mx1.basenordic.cloud (Postfix) with ESMTP id 2B636E72F; Wed, 30 Jun 2021 20:51:37 +0200 (CEST) From: David Sommerseth To: openvpn-devel@lists.sourceforge.net Date: Wed, 30 Jun 2021 20:51:34 +0200 Message-Id: <20210630185134.144826-1-openvpn@sf.lists.topphemmelig.net> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210630180643.139673-1-openvpn@sf.lists.topphemmelig.net> References: <20210630180643.139673-1-openvpn@sf.lists.topphemmelig.net> 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: 1lyfJO-0006qc-5R Subject: [Openvpn-devel] [PATCH v2] 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 Acked-by: Gert Doering --- v2 - Fix incorrect HTML generation, use rst2html --- doc/Makefile.am | 52 ++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index f5b08f9e..b9d0df7c 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 > $@ + $(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 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)