make html in doc/man using mandoc (sans Toc feature)
authorng0 <ng0@n0.is>
Sun, 10 Mar 2019 17:20:29 +0000 (17:20 +0000)
committerng0 <ng0@n0.is>
Sun, 10 Mar 2019 17:20:29 +0000 (17:20 +0000)
doc/man/.gitignore
doc/man/Makefile.am
doc/man/produce_html.sh [new file with mode: 0755]

index 458457f42cb50393db3c59fb30972d62aa9d4a84..f86ff75d18a37a46dad5074b43d85cdcece6564e 100644 (file)
@@ -1,2 +1,3 @@
 gnunet.conf.5
 groff_lint.log
+*.html
index a49c4e7b823d137fa0ae6f00af12528afee1bc4b..a88d5af0aa70259e275c19ce822c9e37ffe288ca 100644 (file)
@@ -5,7 +5,10 @@ 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
 
-CLEANFILES = gnunet.conf.5
+CLEANFILES = gnunet.conf.5 *.html
+
+html:
+       $(SH) $(srcdir)/produce_html.sh
 
 man_MANS = \
   gnunet.conf.5 \
diff --git a/doc/man/produce_html.sh b/doc/man/produce_html.sh
new file mode 100755 (executable)
index 0000000..ce6dea3
--- /dev/null
@@ -0,0 +1,14 @@
+#!/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