From 18d272da7b9a03914abba35ef3992a7e34467ac2 Mon Sep 17 00:00:00 2001 From: ng0 Date: Mon, 25 Nov 2019 21:51:56 +0000 Subject: [PATCH] man/produce_html: use shlib --- doc/man/Makefile.am | 10 +++++++++- doc/man/{produce_html.sh => produce_html.sh.in} | 5 +---- 2 files changed, 10 insertions(+), 5 deletions(-) rename doc/man/{produce_html.sh => produce_html.sh.in} (71%) 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.in similarity index 71% rename from doc/man/produce_html.sh rename to doc/man/produce_html.sh.in index ce6dea304..3f4520776 100755 --- a/doc/man/produce_html.sh +++ b/doc/man/produce_html.sh.in @@ -1,9 +1,6 @@ #!/bin/sh -existence() -{ - command -v "$1" >/dev/null 2>&1 -} +. @pkgdatadir@/existence.sh if existence mandoc; then -- 2.25.1