summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-04-01 19:55:52 +0000
committerng0 <ng0@n0.is>2019-04-01 19:55:52 +0000
commit14885fb5b1af5b3e4ae15b23201ac3e5b6e11667 (patch)
tree25a3c20cb64847307d46ca1edca96b743a424d67 /doc
parentd9415604a052facf2be3f684de176a94dd37f660 (diff)
#5616 - finish. fix texi2mdoc generation
Diffstat (limited to 'doc')
-rw-r--r--doc/handbook/Makefile.am7
-rw-r--r--doc/man/.gitignore2
-rw-r--r--doc/man/Makefile.am23
-rwxr-xr-xdoc/man/texi2mdoc-generation.sh15
-rw-r--r--doc/tutorial/Makefile.am7
5 files changed, 38 insertions, 16 deletions
diff --git a/doc/handbook/Makefile.am b/doc/handbook/Makefile.am
index 0b39ece9d..a50a58937 100644
--- a/doc/handbook/Makefile.am
+++ b/doc/handbook/Makefile.am
@@ -154,13 +154,6 @@ version.texi/replacement/revert:
@echo "@set VERSION GPACKAGE_VERSION" > gversion.texi
@echo "@set EDITION GPACKAGE_VERSION" >> gversion.texi
-if TEXI2MDOC_GENERATION
-gnunet-documentation.7: version.texi/replacement
- @echo Attempting to output an mdoc formatted section 7 document
- @texi2mdoc -I$(pwd):$(pwd)/chapters gnunet.texi > ../man/gnunet-documentation.7
-
-# TODO: (Maybe) other outputs resulting from this.
-endif
# FIXME: rm *.html and *.pdf
#doc-clean:
diff --git a/doc/man/.gitignore b/doc/man/.gitignore
index f86ff75d1..38ed67872 100644
--- a/doc/man/.gitignore
+++ b/doc/man/.gitignore
@@ -1,3 +1,5 @@
gnunet.conf.5
groff_lint.log
*.html
+gnunet-c-tutorial.7
+gnunet-documentation.7
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
index a88d5af0a..e739be78b 100644
--- a/doc/man/Makefile.am
+++ b/doc/man/Makefile.am
@@ -5,8 +5,21 @@ 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
+if TEXI2MDOC_GENERATION
+gnunet-c-tutorial.7: Makefile gnunet-tutorial.7
+ @echo generated texi2mdoc output
+
+gnunet-tutorial.7: Makefile
+ $(SH) $(srcdir)/texi2mdoc-generation.sh
+
+endif
+
CLEANFILES = gnunet.conf.5 *.html
+if TEXI2MDOC_GENERATION
+CLEANFILES += gnunet-documentation.7 gnunet-c-tutorial.7
+endif
+
html:
$(SH) $(srcdir)/produce_html.sh
@@ -58,10 +71,14 @@ man_MANS = \
gnunet-vpn.1 \
gnunet-zoneimport.1
+if TEXI2MDOC_GENERATION
+man_MANS += gnunet-c-tutorial.7 gnunet-documentation.7
+endif
+
EXTRA_DIST = ${man_MANS} \
- gnunet.conf.5.in
+ gnunet.conf.5.in \
+ texi2mdoc-generation.sh
if TEXI2MDOC_GENERATION
-EXTRA_DIST += gnunet-documentation.7 \
- gnunet-c-tutorial.7
+EXTRA_DIST += gnunet-documentation.7 gnunet-c-tutorial.7
endif
diff --git a/doc/man/texi2mdoc-generation.sh b/doc/man/texi2mdoc-generation.sh
new file mode 100755
index 000000000..b88987cda
--- /dev/null
+++ b/doc/man/texi2mdoc-generation.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+# This script is in the public-domain.
+# GNUnet e.V. 2019
+#
+# Commentary: generate texi2mdoc output. This would be easier with
+# bmake / BSDmake, oh well.
+#
+# Excercise for future readers: don't fix this.
+
+# echo $(pwd)
+cd ../tutorial
+texi2mdoc -I$(pwd):$(pwd)/chapters gnunet-tutorial.texi > ../man/gnunet-c-tutorial.7
+# echo $(pwd)
+cd ../handbook
+texi2mdoc -I$(pwd):$(pwd)/chapters gnunet.texi > ../man/gnunet-documentation.7
diff --git a/doc/tutorial/Makefile.am b/doc/tutorial/Makefile.am
index e76d55b8b..f3908aa99 100644
--- a/doc/tutorial/Makefile.am
+++ b/doc/tutorial/Makefile.am
@@ -93,12 +93,7 @@ version.texi/replacement/revert:
@echo "@set VERSION GPACKAGE_VERSION" > gversion.texi
@echo "@set EDITION GPACKAGE_VERSION" >> gversion.texi
-if TEXI2MDOC_GENERATION
-gnunet-tutorial.7: version.texi/replacement
- @echo Attempting to output an mdoc formatted section 7 document
- @texi2mdoc -I$(pwd):$(pwd)/chapters gnunet-c-tutorial.texi > ../man/gnunet-c-tutorial.7
-# TODO: (Maybe) other outputs resulting from this.
-endif
+
# FIXME: rm *.html and *.pdf
#doc-clean: