diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-08-28 05:54:01 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-08-28 09:21:38 +0000 |
commit | 164ba68e506c5a23583e29c29a217d212b62f543 (patch) | |
tree | b63a129aee145384e1f69f36ddb7995081bddaaf /apache/share/man/Makefile | |
parent | Adding upstream version 20190301-lts1. (diff) | |
download | open-infrastructure-service-tools-164ba68e506c5a23583e29c29a217d212b62f543.tar.xz open-infrastructure-service-tools-164ba68e506c5a23583e29c29a217d212b62f543.zip |
Adding upstream version 20210828.upstream/20210828
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | apache/share/man/Makefile (renamed from share/man/Makefile) | 43 |
1 files changed, 30 insertions, 13 deletions
diff --git a/share/man/Makefile b/apache/share/man/Makefile index 2fe75b5..ff27677 100644 --- a/share/man/Makefile +++ b/apache/share/man/Makefile @@ -1,4 +1,6 @@ -# Copyright (C) 2014-2019 Daniel Baumann <daniel.baumann@open-infrastructure.net> +# Open Infrastructure: service-tools + +# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net> # # SPDX-License-Identifier: GPL-3.0+ # @@ -13,30 +15,45 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. + +# Depends: python3-docutils -# Depends: asciidoc dblatex docbook-xsl libxml2-utils source-highlight +RST2MAN = rst2man \ + --no-datestamp \ + --no-generator \ + --strict \ + --strip-comments \ + --tab-width=4 \ + --verbose -A2X = a2x \ - --asciidoc-opts "-a revdate=$(shell cat ../../VERSION.txt)" \ - --doctype=manpage +VERSION := $(shell cat ../../../VERSION.txt) SHELL := sh -e all: build -clean: - rm -f *.[0-9] - rm -f *.xml - build: man rebuild: clean build -man: *.txt - for FILE in *.txt; \ +man: man.in *.rst + @echo -n "Creating manpages... " + + @for FILE in *.rst; \ do \ - $(A2X) --format=manpage $${FILE}; \ + cp man.in $$(basename $${FILE} .rst); \ + $(RST2MAN) $${FILE} | \ + sed -e '/^.\\" Man page generated/d' \ + -e '/^.\\" Generated by/d' \ + -e "s|^\(.TH .*\) \(\"\" \"\"\) |\1 $${VERSION} service-tools |" \ + >> $$(basename $${FILE} .rst); \ + echo -n "."; \ done + @echo " done." + +clean: + rm -f *.[0-9] + .PHONY: all clean build rebuild man |