From 571fedb62290ec6fc059830efc6ffaaff337e3d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Courr=C3=A8ges-Anglas?= Date: Thu, 20 Feb 2014 01:20:05 +0100 Subject: Replace man(7) manpage with a mdoc(7)-formatted one. * The former manpage needed Groff to be properly formatted, this is a dependancy I want to remove. Support for systems where neither groff nor mandoc are available is achieved by generating a man(7) manpage, which will be shipped in the tarballs. * The mdoc(7) language provides semantic annotations for better documentation of Unix utilities, contrary to man(7) which provides mere presentation markup. * The build system now encodes paths in the manpage according to the settings passed to ./configure. Note that some markup used may not be perfectly appropriate. Comments about this matter, and questions from distro maintainers using manpage patches are welcome. Selected reading: - http://mdocml.bsd.lv general information about mdoc(7) - http://mdocml.bsd.lv/mdoc.7.html mdoc(7) macros reference - http://manpages.bsd.lv/ mdoc(7) tutorial --- configure.ac | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index bed8112..bc1aa03 100644 --- a/configure.ac +++ b/configure.ac @@ -80,8 +80,25 @@ fi AC_SUBST(XFT_CFLAGS) AC_SUBST(XFT_LIBS) +AC_MSG_CHECKING([manpage format]) +AC_ARG_ENABLE([mdoc], + [AS_HELP_STRING([--disable-mdoc], + [install man(7) manpages, useful if you don't have a mdoc(7) formatter\ + such as mandoc(1) or groff(1)])], + [], [enable_mdoc=yes]) +AS_CASE([$enable_mdoc], + [yes], [manpage_format=mdoc], + [no], [manpage_format=man], + [AC_MSG_ERROR([invalid --disable-mdoc="$enable_mdoc" parameter])]) +AC_MSG_RESULT([$manpage_format]) +AC_SUBST([manpage_format]) + dnl Checks for programs. AC_PROG_CC +AC_PATH_PROG([MANDOC], [mandoc]) +AC_ARG_VAR([MANDOC], + [path to mandoc(1), only used when regenerating doc/ratpoison.man.1 \ + after editing doc/ratpoison.mdoc.1]) if test "x$CC" = "xgcc"; then CFLAGS="-Wall $CFLAGS" -- cgit v1.2.3