summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2020-06-03 13:03:34 +1000
committerSergey Udaltsov <sergey.udaltsov@gmail.com>2020-06-19 21:46:51 +0000
commit3e39f931e39a81870f966f8e9fe24e1dd447e51b (patch)
tree524d896eb770d7c22ccde7173969462affc201d0 /man
parent4be685f39f72c6b5c299badb7646d66d589da822 (diff)
downloadxkeyboard-config-3e39f931e39a81870f966f8e9fe24e1dd447e51b.tar.gz
man: swap __ for @ in the sed substitutions
meson cannot replace __foo__ easily, it's built to substitute only @foo@. So as prep-work let's switch to that notation but add an extra sed to swap that back to the __foo__ notation for autotools. That one can't switch away from that either because it relies on MAN_SUBST which is filled in by xorg-macros.m4. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'man')
-rw-r--r--man/Makefile.am3
-rw-r--r--man/man.xsl24
2 files changed, 14 insertions, 13 deletions
diff --git a/man/Makefile.am b/man/Makefile.am
index 8d55603..8b3946d 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -11,7 +11,8 @@ MAN_SUBSTS += -e 's|__xkb_base__|$(xkb_base)|g'
xkeyboard-config.man: $(top_srcdir)/rules/evdev.xml $(srcdir)/man.xsl
$(XSLTPROC) -nonet $(srcdir)/man.xsl $(top_srcdir)/rules/evdev.xml > $@
+# First sed swaps @appmansuffix@ back to __appmansuffix__ for the MAN_SUBSTS
.man.$(MISC_MAN_SUFFIX):
- $(SED) $(MAN_SUBSTS) < $< > $@
+ $(SED) -e 's|@\(\<[a-z_]*\>\)@|__\1__|g' < $< | $(SED) $(MAN_SUBSTS) > $@
endif
diff --git a/man/man.xsl b/man/man.xsl
index a5bd14d..883cfa3 100644
--- a/man/man.xsl
+++ b/man/man.xsl
@@ -3,13 +3,13 @@
<xsl:output method="text" encoding="UTF-8" doctype-system="xkb.dtd"/>
<xsl:template match="/xkbConfigRegistry">
<xsl:text><![CDATA[.\" WARNING: this man page is autogenerated. Do not edit or you will lose all your changes.
-.TH XKEYBOARD-CONFIG __miscmansuffix__ __vendorversion__
+.TH XKEYBOARD-CONFIG @miscmansuffix@ @vendorversion@
.SH NAME
xkeyboard-config \- XKB data description files
.SH DESCRIPTION
xkeyboard-config provides the description files for the X Keyboard
Extension (XKB). The configuration options below are usually applied with
-setxkbmap(__appmansuffix__).
+setxkbmap(@appmansuffix@).
.SH MODELS
.TS
left,box;
@@ -37,26 +37,26 @@ Layout(Variant) Description
<xsl:apply-templates select="optionList"/>
<xsl:text><![CDATA[
.SH FILES
-__xkb_base__/compat
+@xkb_base@/compat
-__xkb_base__/compiled
+@xkb_base@/compiled
-__xkb_base__/geometry
+@xkb_base@/geometry
-__xkb_base__/keycodes
+@xkb_base@/keycodes
-__xkb_base__/keymap
+@xkb_base@/keymap
-__xkb_base__/rules
+@xkb_base@/rules
-__xkb_base__/semantics
+@xkb_base@/semantics
-__xkb_base__/symbols
+@xkb_base@/symbols
-__xkb_base__/types
+@xkb_base@/types
.SH SEE ALSO
-setxkbmap(__appmansuffix__)
+setxkbmap(@appmansuffix@)
]]></xsl:text>
</xsl:template>