[libvirt] [PATCH 2/3] automake: generate libvirt keycodes manpages

Guannan Ren gren at redhat.com
Fri Sep 7 13:54:52 UTC 2012


tools/Makefile.am: add make rules for manpages
tools/virsh.pod: add reference to keycodes manpages
.gitignore: ignore manpage files
---
 .gitignore        |  2 +-
 tools/Makefile.am | 31 ++++++++++++++++++++++++++++---
 tools/virsh.pod   | 21 ++++++++++++---------
 3 files changed, 41 insertions(+), 13 deletions(-)

diff --git a/.gitignore b/.gitignore
index d998f0e..d0cd2bd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -168,7 +168,7 @@
 /tests/vmx2xmltest
 /tests/xencapstest
 /tests/xmconfigtest
-/tools/*.[18]
+/tools/*.[158]
 /tools/libvirt-guests.init
 /tools/libvirt-guests.service
 /tools/virsh
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 0d7822d..370601c 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -33,10 +33,11 @@ EXTRA_DIST = \
 	virsh-network.c virsh-nodedev.c			\
 	virsh-nwfilter.c virsh-pool.c			\
 	virsh-secret.c virsh-snapshot.c			\
-	virsh-volume.c
-
+	virsh-volume.c					\
+	keymap-gen.pl
 
 
+BUILT_SOURCES =
 DISTCLEANFILES =
 
 bin_SCRIPTS = virt-xml-validate virt-pki-validate
@@ -47,11 +48,29 @@ sbin_SCRIPTS = virt-sanlock-cleanup
 DISTCLEANFILES += virt-sanlock-cleanup
 endif
 
+LIBVIRT_KEYCODESET= \
+		libvirt-keycode-linux.5 \
+		libvirt-keycode-xt.5 \
+		libvirt-keycode-atset1.5 \
+		libvirt-keycode-atset2.5 \
+		libvirt-keycode-atset3.5 \
+		libvirt-keycode-os_x.5 \
+		libvirt-keycode-xt_kbd.5 \
+		libvirt-keycode-win32.5 \
+		libvirt-keycode-usb.5 \
+		libvirt-keycode-rfb.5
+
+BUILT_SOURCES += $(LIBVIRT_KEYCODESET)
+
 dist_man1_MANS = \
 		virt-host-validate.1 \
 		virt-pki-validate.1 \
 		virt-xml-validate.1 \
 		virsh.1
+
+dist_man5_MANS = \
+		$(LIBVIRT_KEYCODESET)
+
 if HAVE_SANLOCK
 dist_man8_MANS = virt-sanlock-cleanup.8
 endif
@@ -81,6 +100,13 @@ virt-sanlock-cleanup: virt-sanlock-cleanup.in Makefile
 virt-sanlock-cleanup.8: virt-sanlock-cleanup.in
 	$(AM_V_GEN)$(POD2MAN) --name VIRT-SANLOCK-CLEANUP $< $(srcdir)/$@
 
+libvirt-keycode-%.in: keymap-gen.pl ../src/util/keymaps.csv
+	$(AM_V_GEN)$(PERL) keymap-gen.pl  ../src/util/keymaps.csv
+
+libvirt-keycode-%.5: libvirt-keycode-%.in
+	$(AM_V_GEN)$(POD2MAN) --name VIRT-CODESET $< $@
+
+
 virt_host_validate_SOURCES = \
 		virt-host-validate.c \
 		virt-host-validate-common.c virt-host-validate-common.h \
@@ -133,7 +159,6 @@ virsh_CFLAGS =							\
 		$(COVERAGE_CFLAGS)				\
 		$(LIBXML_CFLAGS)				\
 		$(READLINE_CFLAGS)
-BUILT_SOURCES =
 
 if WITH_WIN_ICON
 virsh_LDADD += virsh_win_icon.$(OBJEXT)
diff --git a/tools/virsh.pod b/tools/virsh.pod
index 68138e5..fc7ce67 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -1252,53 +1252,55 @@ be chosen.
 
 The numeric values are those defined by the Linux generic input
 event subsystem. The symbolic names match the corresponding
-Linux key constant macro names.
+Linux key constant macro names. See L<libvirt-keycode-linux(5)>
 
 =item B<xt>
 
 The numeric values are those defined by the original XT keyboard
-controller. No symbolic names are provided
+controller. No symbolic names are provided. See L<libvirt-keycode-xt(5)>
 
 =item B<atset1>
 
 The numeric values are those defined by the AT keyboard controller,
 set 1 (aka XT compatible set). Extended keycoes from B<atset1>
 may differ from extended keycodes in the B<xt> codeset. No symbolic
-names are provided
+names are provided. See L<libvirt-keycode-atset1(5)>
 
 =item B<atset2>
 
 The numeric values are those defined by the AT keyboard controller,
-set 2. No symbolic names are provided
+set 2. No symbolic names are provided. See L<libvirt-keycode-atset2(5)>
 
 =item B<atset3>
 
 The numeric values are those defined by the AT keyboard controller,
-set 3 (aka PS/2 compatible set). No symbolic names are provided
+set 3 (aka PS/2 compatible set). No symbolic names are provided.
+See L<libvirt-keycode-atset3(5)>
 
 =item B<os_x>
 
 The numeric values are those defined by the OS-X keyboard input
 subsystem. The symbolic names match the corresponding OS-X key
-constant macro names
+constant macro names. See L<libvirt-keycode-os_x(5)>
 
 =item B<xt_kbd>
 
 The numeric values are those defined by the Linux KBD device.
 These are a variant on the original XT codeset, but often with
 different encoding for extended keycodes. No symbolic names are
-provided.
+provided. See L<libvirt-keycode-kbd(5)>
 
 =item B<win32>
 
 The numeric values are those defined by the Win32 keyboard input
 subsystem. The symbolic names match the corresponding Win32 key
-constant macro names
+constant macro names. See L<libvirt-keycode-win32(5)>
 
 =item B<usb>
 
 The numeric values are those defined by the USB HID specification
-for keyboard input. No symbolic names are provided
+for keyboard input. No symbolic names are provided.
+See L<libvirt-keycode-usb(5)>
 
 =item B<rfb>
 
@@ -1306,6 +1308,7 @@ The numeric values are those defined by the RFB extension for sending
 raw keycodes. These are a variant on the XT codeset, but extended
 keycodes have the low bit of the second byte set, instead of the high
 bit of the first byte. No symbolic names are provided.
+See L<libvirt-keycode-rfb(5)>
 
 =back
 
-- 
1.7.11.2




More information about the libvir-list mailing list