From: ng0 Date: Mon, 25 Nov 2019 21:51:56 +0000 (+0000) Subject: man/produce_html: use shlib X-Git-Tag: v0.12.0~81 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=18d272da7b9a03914abba35ef3992a7e34467ac2;p=oweals%2Fgnunet.git man/produce_html: use shlib --- diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am index e60d11413..69e42bc9d 100644 --- a/doc/man/Makefile.am +++ b/doc/man/Makefile.am @@ -5,6 +5,8 @@ do_subst = $(SED) -e 's,[@]SYSCONFDIR[@],$(sysconfdir),g' gnunet.conf.5: gnunet.conf.5.in Makefile $(do_subst) < $(srcdir)/gnunet.conf.5.in > gnunet.conf.5 +do_subst_pkgdatadir = $(SED) -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' + CLEANFILES = gnunet.conf.5 if TEXI2MDOC_GENERATION @@ -25,8 +27,13 @@ if HAVE_MANDOC # that this is the most portable way to achieve what # I want and that the alternatives are depressing and # nonfunctional. +produce_html.sh: produce_html.sh.in Makefile + $(do_subst_pkgdatadir) < $(srcdir)/produce_html.sh.in > produce_html.sh + +CLEANFILES += produce_html.sh + .PHONY: man-html -man-html: +man-html: produce_html.sh $(SH) $(srcdir)/produce_html.sh htmldocdir = $(datadir)/doc/gnunet/manhtml/ @@ -96,4 +103,5 @@ endif EXTRA_DIST = ${man_MANS} \ gnunet.conf.5.in \ + produce_html.sh.in \ README diff --git a/doc/man/produce_html.sh b/doc/man/produce_html.sh deleted file mode 100755 index ce6dea304..000000000 --- a/doc/man/produce_html.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -existence() -{ - command -v "$1" >/dev/null 2>&1 -} - -if existence mandoc; -then - for f in `find . -name \*\.[1-9]`; - do - mandoc -T html $f > $f.html; - done -fi diff --git a/doc/man/produce_html.sh.in b/doc/man/produce_html.sh.in new file mode 100755 index 000000000..3f4520776 --- /dev/null +++ b/doc/man/produce_html.sh.in @@ -0,0 +1,11 @@ +#!/bin/sh + +. @pkgdatadir@/existence.sh + +if existence mandoc; +then + for f in `find . -name \*\.[1-9]`; + do + mandoc -T html $f > $f.html; + done +fi