meson: tools/wireshark: generate protocol header files

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
Pavel Hrdina 2020-06-18 01:56:54 +02:00
parent 9cabfd07ea
commit fd90c83585
4 changed files with 23 additions and 13 deletions

View File

@ -33,18 +33,5 @@ wireshark_src_libvirt_la_SOURCES = \
wireshark/src/packet-libvirt.c: wireshark/src/packet-libvirt.h \ wireshark/src/packet-libvirt.c: wireshark/src/packet-libvirt.h \
wireshark/src/libvirt/protocol.h wireshark/src/libvirt/protocol.h
WS_DISSECTOR_PROTO_FILES = \
$(abs_top_srcdir)/src/remote/remote_protocol.x \
$(abs_top_srcdir)/src/remote/qemu_protocol.x \
$(abs_top_srcdir)/src/remote/lxc_protocol.x \
$(abs_top_srcdir)/src/rpc/virkeepaliveprotocol.x
wireshark/src/libvirt/protocol.h: wireshark/util/genxdrstub.pl \
$(WS_DISSECTOR_PROTO_FILES)
$(AM_V_GEN)$(MKDIR_P) wireshark/src/libvirt && \
cd wireshark/src && \
LIBVIRT_VERSION=$(LIBVIRT_VERSION) \
$(PERL) $(abs_top_srcdir)/tools/wireshark/util/genxdrstub.pl \
$(WS_DISSECTOR_PROTO_FILES)
endif WITH_WIRESHARK_DISSECTOR endif WITH_WIRESHARK_DISSECTOR

View File

@ -1 +1,3 @@
genxdrstup_prog = find_program('util/genxdrstub.pl') genxdrstup_prog = find_program('util/genxdrstub.pl')
subdir('src')

View File

@ -0,0 +1,20 @@
wireshark_protocol = custom_target(
'protocol.h',
input: [
meson.source_root() / 'src' / 'remote' / 'remote_protocol.x',
meson.source_root() / 'src' / 'remote' / 'qemu_protocol.x',
meson.source_root() / 'src' / 'remote' / 'lxc_protocol.x',
meson.source_root() / 'src' / 'rpc' / 'virkeepaliveprotocol.x',
],
output: [
'protocol.h',
'remote.h',
'qemu.h',
'lxc.h',
'keepalive.h',
],
command: [
genxdrstup_prog, meson.project_version(),
meson.current_build_dir(), '@INPUT@',
],
)

View File

@ -0,0 +1 @@
subdir('libvirt')