From fd90c83585275bbf1076ea3876f88a1c405b3759 Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Thu, 18 Jun 2020 01:56:54 +0200 Subject: [PATCH] meson: tools/wireshark: generate protocol header files Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa Reviewed-by: Neal Gompa --- tools/Makefile.am | 13 ------------- tools/wireshark/meson.build | 2 ++ tools/wireshark/src/libvirt/meson.build | 20 ++++++++++++++++++++ tools/wireshark/src/meson.build | 1 + 4 files changed, 23 insertions(+), 13 deletions(-) create mode 100644 tools/wireshark/src/libvirt/meson.build create mode 100644 tools/wireshark/src/meson.build diff --git a/tools/Makefile.am b/tools/Makefile.am index 4cb0a07afb..b42bcf29c5 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -33,18 +33,5 @@ wireshark_src_libvirt_la_SOURCES = \ wireshark/src/packet-libvirt.c: wireshark/src/packet-libvirt.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 diff --git a/tools/wireshark/meson.build b/tools/wireshark/meson.build index a71bc04eb3..cb43a0640d 100644 --- a/tools/wireshark/meson.build +++ b/tools/wireshark/meson.build @@ -1 +1,3 @@ genxdrstup_prog = find_program('util/genxdrstub.pl') + +subdir('src') diff --git a/tools/wireshark/src/libvirt/meson.build b/tools/wireshark/src/libvirt/meson.build new file mode 100644 index 0000000000..9d54f827d3 --- /dev/null +++ b/tools/wireshark/src/libvirt/meson.build @@ -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@', + ], +) diff --git a/tools/wireshark/src/meson.build b/tools/wireshark/src/meson.build new file mode 100644 index 0000000000..f41189ba8d --- /dev/null +++ b/tools/wireshark/src/meson.build @@ -0,0 +1 @@ +subdir('libvirt')