From dc0d07278c1d655d3bf03cdbecd82f1e589ac9f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Fri, 18 Oct 2019 15:29:47 +0100 Subject: [PATCH] docs: convert virkeycode*/virkeyname* man pages from pod to rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The keycodemap tool is told to generate docs in rst format now instead of pod. Reviewed-by: Cole Robinson Signed-off-by: Daniel P. Berrangé --- docs/Makefile.am | 30 ++++++++++++++++++++++++++++ docs/manpages/index.rst | 16 +++++++++++++++ src/util/Makefile.inc.am | 43 +--------------------------------------- 3 files changed, 47 insertions(+), 42 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index d92e11ecf8..eb8de80b9c 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -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) \ diff --git a/docs/manpages/index.rst b/docs/manpages/index.rst index 1041dbf8b4..4945ad59e2 100644 --- a/docs/manpages/index.rst +++ b/docs/manpages/index.rst @@ -19,3 +19,19 @@ Tools * `virt-login-shell(1) `__ - tool to execute a shell within a container * `virt-admin(1) `__ - daemon administration interface * `virsh(1) `__ - management user interface + +Key codes +========= + +* `virkeycode-atset1 `__ - atset1 keycodes +* `virkeycode-atset2 `__ - atset2 keycodes +* `virkeycode-atset3 `__ - atset3 keycodes +* `virkeycode-linux `__ - linux keycodes +* `virkeycode-qnum `__ - qnmum keycodes +* `virkeycode-osx `__ - osx keycodes +* `virkeycode-usb `__ - usb keycodes +* `virkeycode-win32 `__ - win32 keycodes +* `virkeycode-xtkbd `__ - xtkbd keycodes +* `virkeyname-linux `__ - keycodes +* `virkeyname-osx `__ - osx keynames +* `virkeyname-win32 `__ - win32 keynames diff --git a/src/util/Makefile.inc.am b/src/util/Makefile.inc.am index ec10e53606..459378b264 100644 --- a/src/util/Makefile.inc.am +++ b/src/util/Makefile.inc.am @@ -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 $@ -- GitLab