diff --git a/configure.in b/configure.in index 527e807b..a037abbe 100644 --- a/configure.in +++ b/configure.in @@ -3,6 +3,13 @@ AC_CONFIG_SRCDIR(rules/base.xml.in) AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE +# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS +m4_ifndef([XORG_MACROS_VERSION], + [m4_fatal([must install xorg-macros 1.8 or later before + running autoconf/autogen])]) +XORG_MACROS_VERSION(1.8) +XORG_MANPAGE_SECTIONS + AC_SUBST(VERSION) AC_PATH_PROG([XKBCOMP], [xkbcomp], [not_found]) @@ -24,6 +31,13 @@ AC_ARG_ENABLE( compat_rules, enable_compat_rules="$enableval", enable_compat_rules="yes" ) +AC_PATH_PROG(SED, [sed]) +AC_PATH_PROG(XSLTPROC, [xsltproc]) +AM_CONDITIONAL([HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"]) +if test "x$XSLTPROC" = "x"; then + AC_MSG_WARN([xsltproc not found, needed to generate man page.]) +fi + # xkeyboard-config does not have build-time dependencies. However, it does # have run-time dependencies and keyboard layouts may not work without the # right libX11 or xproto installed. diff --git a/rules/Makefile.am b/rules/Makefile.am index f2d73ce8..39351c9c 100644 --- a/rules/Makefile.am +++ b/rules/Makefile.am @@ -234,3 +234,11 @@ rulesdir = $(xkb_base)/rules xmldir = $(rulesdir) @INTLTOOL_XML_NOMERGE_RULE@ + +xkeyboard-config.man: evdev.xml + $(XSLTPROC) $(top_srcdir)/xslt/man.xsl evdev.xml > $@ + +xkeyboard-config.7: xkeyboard-config.man + $(SED) $(MAN_SUBSTS) < $< > $@ + +dist_man_MANS = xkeyboard-config.7 diff --git a/xslt/man.xsl b/xslt/man.xsl new file mode 100644 index 00000000..f0475e04 --- /dev/null +++ b/xslt/man.xsl @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +