aboutsummaryrefslogtreecommitdiff
path: root/doc/man
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-12-02 15:30:56 +0000
committerng0 <ng0@n0.is>2019-12-02 15:30:56 +0000
commitc8e5e28048dd9605f7958ef95f2a6dd626658069 (patch)
tree52375a14cc93c4161a658b4c7a1926dda11d8909 /doc/man
parent53f35813d89de6f7c91883277129ffda3ca5b772 (diff)
downloadgnunet-c8e5e28048dd9605f7958ef95f2a6dd626658069.tar.gz
gnunet-c8e5e28048dd9605f7958ef95f2a6dd626658069.zip
rewrite sed logic used in Makefiles and move into dosubst awk script.
include 'bin' and its files in dist files, this is where dosubst is located. While the invocation (passing of the variables) is not optimal (yet, will be changed), this will in the end allow sharing code between Makefiles better, and maybe drop sed usage in the future.
Diffstat (limited to 'doc/man')
-rw-r--r--doc/man/Makefile.am8
-rwxr-xr-xdoc/man/produce_html.sh.in4
2 files changed, 4 insertions, 8 deletions
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
index 601a85555..a0283cf44 100644
--- a/doc/man/Makefile.am
+++ b/doc/man/Makefile.am
@@ -1,11 +1,7 @@
1# This Makefile.am is in the public domain 1# This Makefile.am is in the public domain
2 2
3do_subst = $(SED) -e 's,[@]SYSCONFDIR[@],$(sysconfdir),g'
4
5gnunet.conf.5: gnunet.conf.5.in Makefile 3gnunet.conf.5: gnunet.conf.5.in Makefile
6 $(do_subst) < $(srcdir)/gnunet.conf.5.in > gnunet.conf.5 4 $(AWK) -v bdir="$(bindir)" -v py="$(PYTHON)" -v awkay="$(AWK_BINARY)" -v pfx="$(prefix)" -v prl="$(PERL)" -v sysconfdirectory="$(sysconfdir)" -v pkgdatadirectory="$(pkgdatadir)" -f $(top_srcdir)/bin/dosubst.awk < $(srcdir)/gnunet.conf.5.in > $(srcdir)/gnunet.conf.5
7
8do_subst_pkgdatadir = $(SED) -e 's,[@]pkgdatadir[@],$(pkgdatadir),g'
9 5
10CLEANFILES = gnunet.conf.5 6CLEANFILES = gnunet.conf.5
11 7
@@ -28,7 +24,7 @@ if HAVE_MANDOC
28# I want and that the alternatives are depressing and 24# I want and that the alternatives are depressing and
29# nonfunctional. 25# nonfunctional.
30produce_html.sh: produce_html.sh.in Makefile 26produce_html.sh: produce_html.sh.in Makefile
31 $(do_subst_pkgdatadir) < $(srcdir)/produce_html.sh.in > produce_html.sh 27 $(AWK) -v bdir="$(bindir)" -v py="$(PYTHON)" -v awkay="$(AWK_BINARY)" -v pfx="$(prefix)" -v prl="$(PERL)" -v sysconfdirectory="$(sysconfdir)" -v pkgdatadirectory="$(pkgdatadir)" -f $(top_srcdir)/bin/dosubst.awk < $(srcdir)/produce_html.sh.in > produce_html.sh
32 @chmod +x produce_html.sh 28 @chmod +x produce_html.sh
33 29
34CLEANFILES += produce_html.sh 30CLEANFILES += produce_html.sh
diff --git a/doc/man/produce_html.sh.in b/doc/man/produce_html.sh.in
index 962601513..d2bd768a8 100755
--- a/doc/man/produce_html.sh.in
+++ b/doc/man/produce_html.sh.in
@@ -1,8 +1,8 @@
1#!/bin/sh 1#!/bin/sh
2 2
3if test -e @pkgdatadir@/existence.sh 3if test -e @PKGDATADIRECTORY@/existence.sh
4then 4then
5 . @pkgdatadir@/existence.sh 5 . @PKGDATADIRECTORY@/existence.sh
6else 6else
7 . $dir/../../contrib/build-common/sh/lib.sh/existence.sh 7 . $dir/../../contrib/build-common/sh/lib.sh/existence.sh
8fi 8fi