提交 dc0d0727 编写于 作者: D Daniel P. Berrangé

docs: convert virkeycode*/virkeyname* man pages from pod to rst

The keycodemap tool is told to generate docs in rst format now
instead of pod.
Reviewed-by: NCole Robinson <crobinso@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 ab06dd9d
......@@ -197,6 +197,10 @@ kbase_html = \
kbasedir = $(HTML_DIR)/kbase
kbase_DATA = $(kbase_html)
# Sync with src/util/
KEYCODES = linux osx atset1 atset2 atset3 xtkbd usb win32 qnum
KEYNAMES = linux osx win32
manpages_rst = \
manpages/index.rst \
$(NULL)
......@@ -207,6 +211,8 @@ manpages1_rst = \
manpages/virsh.rst \
$(NULL)
manpages7_rst = \
$(KEYCODES:%=manpages/virkeycode-%.rst) \
$(KEYNAMES:%=manpages/virkeyname-%.rst) \
$(NULL)
manpages8_rst = \
manpages/virt-sanlock-cleanup.rst \
......@@ -269,6 +275,29 @@ man8_MANS = $(manpages8_rst:%.rst=%.8)
-e 's|RUNSTATEDIR|$(runstatedir)|g' | \
$(RST2MAN) > $@
manpages/virkeycode-%.rst: $(top_srcdir)/src/keycodemapdb/data/keymaps.csv \
$(top_srcdir)/src/keycodemapdb/tools/keymap-gen Makefile.am
$(AM_V_GEN)export NAME=`echo $@ | \
sed -e 's,manpages/virkeycode-,,' -e 's,\.rst,,'` && \
$(MKDIR_P) manpages/ && \
$(RUNUTF8) $(PYTHON) $(top_srcdir)/src/keycodemapdb/tools/keymap-gen \
code-docs \
--lang rst \
--title "virkeycode-$$NAME" \
--subtitle "Key code values for $$NAME" \
$(top_srcdir)/src/keycodemapdb/data/keymaps.csv $$NAME > $@
manpages/virkeyname-%.rst: $(top_srcdir)/src/keycodemapdb/data/keymaps.csv \
$(top_srcdir)/src/keycodemapdb/tools/keymap-gen Makefile.am
$(AM_V_GEN)export NAME=`echo $@ | \
sed -e 's,manpages/virkeyname-,,' -e 's,\.rst,,'` && \
$(MKDIR_P) manpages/ && \
$(RUNUTF8) $(PYTHON) $(top_srcdir)/src/keycodemapdb/tools/keymap-gen \
name-docs \
--lang rst \
--title "virkeyname-$$NAME" \
--subtitle "Key name values for $$NAME" \
$(top_srcdir)/src/keycodemapdb/data/keymaps.csv $$NAME > $@
manpagesdir = $(HTML_DIR)/manpages
manpages_DATA = $(manpages_html)
......@@ -342,6 +371,7 @@ CLEANFILES = \
$(manpages_html) \
$(man1_MANS) \
$(man7_MANS) \
$(manpages7_rst) \
$(man8_MANS) \
$(api_DATA) \
$(dot_html_generated_in) \
......
......@@ -19,3 +19,19 @@ Tools
* `virt-login-shell(1) <virt-login-shell.html>`__ - tool to execute a shell within a container
* `virt-admin(1) <virt-admin.html>`__ - daemon administration interface
* `virsh(1) <virsh.html>`__ - management user interface
Key codes
=========
* `virkeycode-atset1 <virkeycode-atset1.html>`__ - atset1 keycodes
* `virkeycode-atset2 <virkeycode-atset2.html>`__ - atset2 keycodes
* `virkeycode-atset3 <virkeycode-atset3.html>`__ - atset3 keycodes
* `virkeycode-linux <virkeycode-linux.html>`__ - linux keycodes
* `virkeycode-qnum <virkeycode-qnum.html>`__ - qnmum keycodes
* `virkeycode-osx <virkeycode-osx.html>`__ - osx keycodes
* `virkeycode-usb <virkeycode-usb.html>`__ - usb keycodes
* `virkeycode-win32 <virkeycode-win32.html>`__ - win32 keycodes
* `virkeycode-xtkbd <virkeycode-xtkbd.html>`__ - xtkbd keycodes
* `virkeyname-linux <virkeyname-linux.html>`__ - keycodes
* `virkeyname-osx <virkeyname-osx.html>`__ - osx keynames
* `virkeyname-win32 <virkeyname-win32.html>`__ - win32 keynames
......@@ -242,7 +242,7 @@ EXTRA_DIST += \
$(srcdir)/keycodemapdb/tools/keymap-gen \
$(NULL)
# Sync with docs/
KEYCODES = linux osx atset1 atset2 atset3 xtkbd usb win32 qnum
KEYNAMES = linux osx win32
......@@ -251,15 +251,8 @@ KEYTABLES = \
$(KEYNAMES:%=util/virkeynametable_%.h) \
$(NULL)
KEYPODS = $(KEYCODES:%=util/virkeycode-%.pod) \
$(KEYNAMES:%=util/virkeyname-%.pod)
KEYMANS = $(KEYPODS:%.pod=%.7)
man7_MANS += $(KEYMANS)
BUILT_SOURCES += $(KEYTABLES)
CLEANFILES += $(KEYTABLES)
CLEANFILES += $(KEYMANS) $(KEYPODS)
UTIL_IO_HELPER_SOURCES = util/iohelper.c
......@@ -323,37 +316,3 @@ util/virkeynametable_%.h: $(srcdir)/keycodemapdb/data/keymaps.csv \
name-table --lang stdc --varname virKeyNameTable_$$NAME \
$(srcdir)/keycodemapdb/data/keymaps.csv $$NAME > $@-tmp && \
mv $@-tmp $@ || rm -f $@-tmp
util/virkeycode-%.pod: $(srcdir)/keycodemapdb/data/keymaps.csv \
$(srcdir)/keycodemapdb/tools/keymap-gen Makefile.am
$(AM_V_GEN)export NAME=`echo $@ | sed -e 's,util/virkeycode-,,' \
-e 's,\.pod,,'` && \
$(MKDIR_P) util/ && \
$(RUNUTF8) $(PYTHON) $(srcdir)/keycodemapdb/tools/keymap-gen \
code-docs --lang pod \
--title "virkeycode-$$NAME" \
--subtitle "Key code values for $$NAME" \
$(srcdir)/keycodemapdb/data/keymaps.csv $$NAME > \
$@-tmp && mv $@-tmp $@ || rm $@-tmp
util/virkeyname-%.pod: $(srcdir)/keycodemapdb/data/keymaps.csv \
$(srcdir)/keycodemapdb/tools/keymap-gen Makefile.am
$(AM_V_GEN)export NAME=`echo $@ | sed -e 's,util/virkeyname-,,' \
-e 's,\.pod,,'` && \
$(MKDIR_P) util/ && \
$(RUNUTF8) $(PYTHON) $(srcdir)/keycodemapdb/tools/keymap-gen \
name-docs --lang pod \
--title "virkeyname-$$NAME" \
--subtitle "Key name values for $$NAME" \
$(srcdir)/keycodemapdb/data/keymaps.csv $$NAME > \
$@-tmp && mv $@-tmp $@ || rm $@-tmp
util/virkey%.7: util/virkey%.pod
$(AM_V_GEN)$(POD2MAN) --section=7 $< $@-t1 && \
if grep 'POD ERROR' $@-t1; then rm $@-t1; exit 1; fi && \
sed \
-e 's|SYSCONFDIR|\@sysconfdir\@|g' \
-e 's|LOCALSTATEDIR|\@localstatedir\@|g' \
< $@-t1 > $@-t2 && \
rm -f $@-t1 && \
mv $@-t2 $@
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册