]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Fix deps for generating RPC dispatch code
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 14 Mar 2013 14:54:09 +0000 (14:54 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 14 Mar 2013 14:55:43 +0000 (14:55 +0000)
The src/lxc/lxc_*_dispatch.h files only had deps on the
RPC generator script & the XDR definition file. So when
the Makefile.am args passed to the generator were change,
the disaptch code was not re-generated. This caused a
build failure

  CC       libvirt_lxc-lxc_controller.o
lxc/lxc_controller.c: In function 'virLXCControllerSetupServer':
lxc/lxc_controller.c:718:47: error: 'virLXCMonitorProcs' undeclared (first use in this function)
lxc/lxc_controller.c:718:47: note: each undeclared identifier is reported only once for each function it appears in
lxc/lxc_controller.c:719:47: error: 'virLXCMonitorNProcs' undeclared (first use in this function)
make[3]: *** [libvirt_lxc-lxc_controller.o] Error 1

For added fun, the generated files were not listed in
CLEANFILES, so only a 'git clean -f' would fix the build

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/Makefile.am

index 0c0dfb3892af9ff8d5c6649cfc6b3f5122430de2..8b591d2c762e590f31e89e5e182e59f142f4d76e 100644 (file)
@@ -295,17 +295,17 @@ QEMU_PROTOCOL = $(srcdir)/remote/qemu_protocol.x
 REMOTE_DRIVER_PROTOCOL = $(REMOTE_PROTOCOL) $(QEMU_PROTOCOL) $(LXC_PROTOCOL)
 
 $(srcdir)/remote/remote_client_bodies.h: $(srcdir)/rpc/gendispatch.pl \
-               $(REMOTE_PROTOCOL)
+               $(REMOTE_PROTOCOL) Makefile.am
        $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl \
          -k remote REMOTE $(REMOTE_PROTOCOL) > $@
 
 $(srcdir)/remote/lxc_client_bodies.h: $(srcdir)/rpc/gendispatch.pl \
-               $(LXC_PROTOCOL)
+               $(LXC_PROTOCOL) Makefile.am
        $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl \
          -k lxc LXC $(LXC_PROTOCOL) > $@
 
 $(srcdir)/remote/qemu_client_bodies.h: $(srcdir)/rpc/gendispatch.pl \
-               $(QEMU_PROTOCOL)
+               $(QEMU_PROTOCOL) Makefile.am
        $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl \
          -k qemu QEMU $(QEMU_PROTOCOL) > $@
 
@@ -458,12 +458,12 @@ LXC_GENERATED = \
 LXC_MONITOR_PROTOCOL = $(srcdir)/lxc/lxc_monitor_protocol.x
 
 $(srcdir)/lxc/lxc_monitor_dispatch.h: $(srcdir)/rpc/gendispatch.pl \
-               $(LXC_MONITOR_PROTOCOL)
+               $(LXC_MONITOR_PROTOCOL) Makefile.am
        $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl \
          -k virLXCMonitor VIR_LXC_MONITOR $(LXC_MONITOR_PROTOCOL) > $@
 
 $(srcdir)/lxc/lxc_controller_dispatch.h: $(srcdir)/rpc/gendispatch.pl \
-               $(REMOTE_PROTOCOL)
+               $(REMOTE_PROTOCOL) Makefile.am
        $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl \
          -b virLXCMonitor VIR_LXC_MONITOR $(LXC_MONITOR_PROTOCOL) > $@
 
@@ -474,6 +474,8 @@ EXTRA_DIST += \
 
 BUILT_SOURCES += $(LXC_GENERATED)
 
+CLEANFILES += $(LXC_GENERATED)
+
 LXC_DRIVER_SOURCES =                                           \
                $(LXC_MONITOR_PROTOCOL_GENERATED)               \
                $(LXC_MONITOR_GENERATED)                        \