Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
.gitignore | 1 +
cfg.mk | 5 ++++-
src/Makefile.am | 9 ++++++++-
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index b60c16258739..e5e078889c14 100644
--- a/.gitignore
+++ b/.gitignore
@@ -111,6 +111,7 @@
/src/access/viraccessapichecklxc.h
/src/access/viraccessapicheckqemu.c
/src/access/viraccessapicheckqemu.h
+/src/admin/admin_client.h
/src/admin/admin_protocol.[ch]
/src/esx/*.generated.*
/src/hyperv/*.generated.*
diff --git a/cfg.mk b/cfg.mk
index 796ed80fa855..ce13f0ec8b0f 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -1070,13 +1070,16 @@ bracket-spacing-check:
sc_po_check: \
$(srcdir)/daemon/remote_dispatch.h \
$(srcdir)/daemon/qemu_dispatch.h \
- $(srcdir)/src/remote/remote_client_bodies.h
+ $(srcdir)/src/remote/remote_client_bodies.h \
+ $(srcdir)/src/admin/admin_client.h
$(srcdir)/daemon/remote_dispatch.h: $(srcdir)/src/remote/remote_protocol.x
$(MAKE) -C daemon remote_dispatch.h
$(srcdir)/daemon/qemu_dispatch.h: $(srcdir)/src/remote/qemu_protocol.x
$(MAKE) -C daemon qemu_dispatch.h
$(srcdir)/src/remote/remote_client_bodies.h: $(srcdir)/src/remote/remote_protocol.x
$(MAKE) -C src remote/remote_client_bodies.h
+$(srcdir)/src/admin/admin_client.h: $(srcdir)/src/admin/admin_protocol.x
+ $(MAKE) -C src admin/admin_client.h
# List all syntax-check exemptions:
exclude_file_name_regexp--sc_avoid_strcase = ^tools/virsh\.h$$
diff --git a/src/Makefile.am b/src/Makefile.am
index 87d2bc5efaa6..ce8d8fa2295c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -396,7 +396,14 @@ ADMIN_PROTOCOL = $(srcdir)/admin/admin_protocol.x
ADMIN_PROTOCOL_GENERATED = \
admin/admin_protocol.c \
- admin/admin_protocol.h
+ admin/admin_protocol.h \
+ admin/admin_client.h
+
+admin/admin_client.h: $(srcdir)/rpc/gendispatch.pl \
+ $(ADMIN_PROTOCOL) Makefile.am
+ $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=client \
+ admin ADMIN $(ADMIN_PROTOCOL) \
+ > $(srcdir)/admin/admin_client.h
EXTRA_DIST += $(ADMIN_PROTOCOL) $(ADMIN_PROTOCOL_GENERATED)
BUILT_SOURCES += $(ADMIN_PROTOCOL_GENERATED)
--
2.4.3