diff options
author | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2014-02-20 01:20:05 +0100 |
---|---|---|
committer | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2014-02-20 01:50:31 +0100 |
commit | 571fedb62290ec6fc059830efc6ffaaff337e3d2 (patch) | |
tree | 08113a980ec5f09b2db3875bc65f8ba70697ea9e /configure.ac | |
parent | 9a65f65f5ed3be2eb1deefa97e797ee64137ba50 (diff) | |
download | ratpoison-571fedb62290ec6fc059830efc6ffaaff337e3d2.zip |
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
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 17 |
1 files changed, 17 insertions, 0 deletions
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" |