aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-10-30 16:53:50 +0000
committerng0 <ng0@n0.is>2019-10-30 16:53:50 +0000
commit7f2ef3d249860ae72a43605170790401d72478f6 (patch)
treeb5e47289ba9de1b76413fd0b1604d31ef51c4128
parent707e547fe18eb9a009f9e06315460a2869c400c8 (diff)
downloadgnunet-7f2ef3d249860ae72a43605170790401d72478f6.tar.gz
gnunet-7f2ef3d249860ae72a43605170790401d72478f6.zip
configure: add mandoc + texi2mdoc detection
doc/man: add man-html and man-html-install
-rw-r--r--.gitignore2
-rw-r--r--configure.ac49
-rw-r--r--doc/man/Makefile.am22
3 files changed, 61 insertions, 12 deletions
diff --git a/.gitignore b/.gitignore
index 0f3c0acdf..b337cc058 100644
--- a/.gitignore
+++ b/.gitignore
@@ -65,6 +65,8 @@ doc/tutorial/gversion.texi
65uncrustify.cfg 65uncrustify.cfg
66.style.yapf 66.style.yapf
67 67
68diffoscope_reports/
69
68# this exists outside of the main repository 70# this exists outside of the main repository
69cmake/ 71cmake/
70build 72build
diff --git a/configure.ac b/configure.ac
index d4e9e0d1f..a3e6c2385 100644
--- a/configure.ac
+++ b/configure.ac
@@ -426,6 +426,17 @@ AS_IF([test "x$texi2mdoc_generation" = "xyes"],
426 [0], 426 [0],
427 [Not building section 7 mdoc output])]) 427 [Not building section 7 mdoc output])])
428 428
429# test for texi2mdoc
430# TODO: refactor this and the check above.
431AC_MSG_CHECKING(for texi2mdoc)
432AC_CHECK_PROGS(TEXI2MDOC_BINARY, [texi2mdoc], false)
433AM_CONDITIONAL(HAVE_TEXI2MDOC, test x$TEXI2MDOC_BINARY != xfalse)
434
435# test for mandoc
436AC_MSG_CHECKING(for mandoc)
437AC_CHECK_PROGS(MANDOC_BINARY, [mandoc], false)
438AM_CONDITIONAL(HAVE_MANDOC, test x$MANDOC_BINARY != xfalse)
439
429# should the build process be building only the documentation? 440# should the build process be building only the documentation?
430AC_MSG_CHECKING(whether to build only documentation) 441AC_MSG_CHECKING(whether to build only documentation)
431AC_ARG_ENABLE([documentation-only], 442AC_ARG_ENABLE([documentation-only],
@@ -1923,6 +1934,10 @@ AS_IF([test "x$enable_java_ports" = "xyes"],
1923#### but for now let's keep it here. 1934#### but for now let's keep it here.
1924#### 1935####
1925 1936
1937# TODO: We use "WARNING" too often, we need to clarify what
1938# TODO: constitutes a WARNING, an ERROR, and a NOTICE, and
1939# TODO: other message levels.
1940
1926# -- print message regarding enabled experimental features 1941# -- print message regarding enabled experimental features
1927AS_IF([test "x$enable_experimental" = "xyes"], 1942AS_IF([test "x$enable_experimental" = "xyes"],
1928 [experimental_msg="experimental features enabled"]) 1943 [experimental_msg="experimental features enabled"])
@@ -1936,10 +1951,24 @@ AS_IF([test "x$working_libidn2" = x1],
1936# -- libidn 1 1951# -- libidn 1
1937AS_IF([test "x$working_libidn1" = x1], 1952AS_IF([test "x$working_libidn1" = x1],
1938 [libidn1_msg="libidn1"]) 1953 [libidn1_msg="libidn1"])
1939# -- texi2mdoc 1954# -- texi2mdoc-generation
1940AS_IF([test "x$texi2mdoc_generation" = x1], 1955AS_IF([test "x$texi2mdoc_generation" = x1],
1941 [mdoc_msg="yes"], 1956 [mdocml_msg="yes"],
1942 [mdoc_msg="no"]) 1957 [mdocml_msg="no"])
1958AS_IF([test "$VAR_UPNPC_BINARY" = "false"],
1959 [AC_MSG_NOTICE([WARNING: optional upnpc binary not found])
1960 upnpc_msg="no (optional)"],
1961 [upnpc_msg="yes"])
1962# -- texi2mdoc
1963AS_IF([test "x$TEXI2MDOC_BINARY" = "false"],
1964 [AC_MSG_NOTICE([WARNING: optional texi2mdoc binary not found])
1965 texi2mdoc_msg="no (optional)"],
1966 [texi2mdoc_msg="yes"])
1967# -- mandoc
1968AS_IF([test "x$MANDOC_BINARY" = "false"],
1969 [AC_MSG_NOTICE([WARNING: optional mandoc binary not found])
1970 mandoc_msg="no"],
1971 [mandoc_msg="yes"])
1943# -- texinfo 1972# -- texinfo
1944AS_IF([test "x$makeinfo" != "x1"], 1973AS_IF([test "x$makeinfo" != "x1"],
1945 [texinfo_msg="no"], 1974 [texinfo_msg="no"],
@@ -1947,15 +1976,15 @@ AS_IF([test "x$makeinfo" != "x1"],
1947# -- conversation 1976# -- conversation
1948AS_IF([test "x$conversation_backend" = "xnone"], 1977AS_IF([test "x$conversation_backend" = "xnone"],
1949 [AS_IF([test "x$pulse" != "x1"], 1978 [AS_IF([test "x$pulse" != "x1"],
1950 [AC_MSG_NOTICE([WARNING: libpulse(audio) not found, conversation will not be built.]) 1979 [AC_MSG_NOTICE([WARNING: libpulse(audio) not found (required to build conversation against it).])
1951 libpulse_msg="no"], 1980 libpulse_msg="no"],
1952 [libpulse_msg="yes"]) 1981 [libpulse_msg="yes"])
1953 AS_IF([test "x$opus" != "x1"], 1982 AS_IF([test "x$opus" != "x1"],
1954 [AC_MSG_NOTICE([WARNING: libopus not found, conversation will not be built.]) 1983 [AC_MSG_NOTICE([WARNING: libopus not found (conversation)])
1955 libopus_msg="no"], 1984 libopus_msg="no"],
1956 [libopus_msg="yes"]) 1985 [libopus_msg="yes"])
1957 AS_IF([test "x$gst" != "x1"], 1986 AS_IF([test "x$gst" != "x1"],
1958 [AC_MSG_NOTICE([WARNING: GStreamer not found, conversation will not be built.]) 1987 [AC_MSG_NOTICE([WARNING: GStreamer not found (required to build conversation against it).])
1959 gstreamer_msg="no"], 1988 gstreamer_msg="no"],
1960 [gstreamer_msg="yes"])], 1989 [gstreamer_msg="yes"])],
1961 [features_msg="$features_msg conversation"]) 1990 [features_msg="$features_msg conversation"])
@@ -1971,7 +2000,7 @@ AS_IF([test "x$jansson" = "x0"],
1971 [jansson_msg="yes"]) 2000 [jansson_msg="yes"])
1972# -- libextractor 2001# -- libextractor
1973AS_IF([test "$extractor" != 1], 2002AS_IF([test "$extractor" != 1],
1974 [AC_MSG_WARN([ERROR: libextractor not found, but various file-sharing functions require it])], 2003 [AC_MSG_WARN([WARNING: libextractor not found, but various file-sharing functions require it])],
1975 [libextractor_msg="yes"]) 2004 [libextractor_msg="yes"])
1976# -- libzbar 2005# -- libzbar
1977AS_IF([test "x$zbar" = "x1"], 2006AS_IF([test "x$zbar" = "x1"],
@@ -2043,7 +2072,7 @@ AC_SUBST(features_msg)
2043 2072
2044 2073
2045# The summary 2074# The summary
2046# TODO: reduce the length of the last message block ("the message") 2075# TODO: reduce the length of the last message block, following "IMPORTANT".
2047 2076
2048AC_MSG_NOTICE([ 2077AC_MSG_NOTICE([
2049GNUnet Configuration 2078GNUnet Configuration
@@ -2081,9 +2110,11 @@ libopus: ${libopus_msg}
2081gstreamer: ${gstreamer_msg} 2110gstreamer: ${gstreamer_msg}
2082libpulse: ${libpulse_msg} 2111libpulse: ${libpulse_msg}
2083libextractor: ${libextractor_msg} 2112libextractor: ${libextractor_msg}
2113texi2mdoc: ${texi2mdoc_msg}
2114mandoc: ${mandoc_msg}
2084 2115
2085texinfo manual: ${texinfo_msg} 2116texinfo manual: ${texinfo_msg}
2086transpiled mdoc manual: ${mdoc_msg} 2117transpiled mdocml manual: ${mdocml_msg}
2087 2118
2088features: ${features_msg} 2119features: ${features_msg}
2089experimental: ${experimental_msg} 2120experimental: ${experimental_msg}
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
index a4c81dd43..b3ea1c44e 100644
--- a/doc/man/Makefile.am
+++ b/doc/man/Makefile.am
@@ -5,7 +5,7 @@ do_subst = $(SED) -e 's,[@]SYSCONFDIR[@],$(sysconfdir),g'
5gnunet.conf.5: gnunet.conf.5.in Makefile 5gnunet.conf.5: gnunet.conf.5.in Makefile
6 $(do_subst) < $(srcdir)/gnunet.conf.5.in > gnunet.conf.5 6 $(do_subst) < $(srcdir)/gnunet.conf.5.in > gnunet.conf.5
7 7
8CLEANFILES = gnunet.conf.5 *.html 8CLEANFILES = gnunet.conf.5
9 9
10if TEXI2MDOC_GENERATION 10if TEXI2MDOC_GENERATION
11gnunet-c-tutorial.7: Makefile 11gnunet-c-tutorial.7: Makefile
@@ -17,10 +17,26 @@ gnunet-documentation.7: Makefile
17CLEANFILES += gnunet-documentation.7 gnunet-c-tutorial.7 17CLEANFILES += gnunet-documentation.7 gnunet-c-tutorial.7
18endif 18endif
19 19
20 20if HAVE_MANDOC
21html: 21# After I went through the alternatives with the focus
22# on staying as portable as possible to other make
23# implementations, I have to face the fact after hours
24# that this is the most portable way to achieve what
25# I want and that the alternatives are depressing and
26# nonfunctional.
27.PHONY: man-html
28man-html:
22 $(SH) $(srcdir)/produce_html.sh 29 $(SH) $(srcdir)/produce_html.sh
23 30
31htmldocdir = $(datadir)/doc/gnunet/manhtml/
32.PHONY: man-html-install
33man-html-install:
34 @mkdir -p $(htmldocdir)
35 @mv $(srcdir)/*.html $(htmldocdir)
36
37CLEANFILES += *.html
38endif
39
24man_MANS = \ 40man_MANS = \
25 gnunet.conf.5 \ 41 gnunet.conf.5 \
26 gnunet-arm.1 \ 42 gnunet-arm.1 \