]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: tools/wireshark: generate protocol header files
authorPavel Hrdina <phrdina@redhat.com>
Wed, 17 Jun 2020 23:56:54 +0000 (01:56 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Mon, 3 Aug 2020 07:27:05 +0000 (09:27 +0200)
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
tools/Makefile.am
tools/wireshark/meson.build
tools/wireshark/src/libvirt/meson.build [new file with mode: 0644]
tools/wireshark/src/meson.build [new file with mode: 0644]

index 4cb0a07afb81a5de09c1f447dfd3211673132cc7..b42bcf29c53f773b40a46a8bd24471a33ee1ff5d 100644 (file)
@@ -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
index a71bc04eb37740cf9219b9ff0a6171174ffd269a..cb43a0640d9ac065504b710cde3c92770ae9d3e8 100644 (file)
@@ -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 (file)
index 0000000..9d54f82
--- /dev/null
@@ -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 (file)
index 0000000..f41189b
--- /dev/null
@@ -0,0 +1 @@
+subdir('libvirt')