Skip to contentSkip to conversation

Makefile: Install qemu-img and qemu-nbd man pages only if built

PATCH Applied Andreas Färber 2 participants 2 messages Jun 11, 2013 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: Install qemu-img and qemu-nbd man pages only if built

When splitting openSUSE's qemu and qemu-linux-user packages we noticed that for linux-user-only builds unrelated man pages got installed. It's surely possible to delete them before packaging, but not installing them in the first place seems more logical.

---
 Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Makefile +4 -1
index 306e7bd..3cfa7d0 100644
@@ -306,10 +306,13 @@ install-doc: $(DOCS)
 	$(INSTALL_DATA) QMP/qmp-commands.txt "$(DESTDIR)$(qemu_docdir)"
 ifdef CONFIG_POSIX
 	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
-	$(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
+	$(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1"
+ifneq ($(TOOLS),)
+	$(INSTALL_DATA) qemu-img.1 "$(DESTDIR)$(mandir)/man1"
 	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8"
 	$(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
 endif
+endif
 ifdef CONFIG_VIRTFS
 	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
 	$(INSTALL_DATA) fsdev/virtfs-proxy-helper.1 "$(DESTDIR)$(mandir)/man1"
Signature · 1 line
1.8.1.4
#1 lore raw
Quoted 4 lines · Andreas Färber

When splitting openSUSE's qemu and qemu-linux-user packages we noticed that for linux-user-only builds unrelated man pages got installed. It's surely possible to delete them before packaging, but not installing them in the first place seems more logical.

Thanks, applied to the trivial patches queue.

It is somethigh I wanted to do for a long time -- exactly due to the same reason, when we build qemu-user[-static] target on debian it installs the irrelevant manpages... ;)

/mjt