Makefile: install modules with "make install"
authorFam Zheng <famz@redhat.com>
Mon, 10 Feb 2014 06:48:58 +0000 (14:48 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 20 Feb 2014 12:14:18 +0000 (13:14 +0100)
Install all the modules to ${MODDIR}.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Makefile

index 07d1ed7..57d83a3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -368,6 +368,12 @@ install-datadir install-localstatedir
 ifneq ($(TOOLS),)
        $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
 endif
+ifneq ($(CONFIG_MODULES),)
+       $(INSTALL_DIR) "$(DESTDIR)$(qemu_moddir)"
+       for s in $(patsubst %.mo,%$(DSOSUF),$(modules-m)); do \
+               $(INSTALL_PROG) $(STRIP_OPT) $$s "$(DESTDIR)$(qemu_moddir)/$${s//\//-}"; \
+       done
+endif
 ifneq ($(HELPERS-y),)
        $(INSTALL_DIR) "$(DESTDIR)$(libexecdir)"
        $(INSTALL_PROG) $(STRIP_OPT) $(HELPERS-y) "$(DESTDIR)$(libexecdir)"