Skip to contentSkip to conversation

various tweaks to make install

PATCH In review Patrick Mauritz 1 participant 2 messages Nov 15, 2005 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 various tweaks to make install

Hi,

the attached patch against cvs contains two changes:
- every copy to the target location in make install is prefixed with $(DESTDIR) for packaging purposes. it's a no-op when no DESTDIR is given
- copying the bios images is done in a for loop as some "install" tools can't handle multiple sources at once.

patrick mauritz

Index: Makefile
===================================================================
RCS file: /cvsroot/qemu/qemu/Makefile,v
retrieving revision 1.90

Makefile +12 -11
diff -u -u -r1.90 Makefile
@@ -54,21 +54,22 @@
 common  de-ch  es     fo  fr-ca  hu     ja  mk  nl-be      pt  sl     tr
 
 install: all 
-	mkdir -p "$(bindir)"
-	install -m 755 -s $(TOOLS) "$(bindir)"
-	mkdir -p "$(datadir)"
-	install -m 644 pc-bios/bios.bin pc-bios/vgabios.bin \
+	mkdir -p "$(DESTDIR)$(bindir)"
+	install -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)"
+	mkdir -p "$(DESTDIR)$(datadir)"
+	for i in pc-bios/bios.bin pc-bios/vgabios.bin \
                        pc-bios/vgabios-cirrus.bin \
                        pc-bios/ppc_rom.bin pc-bios/video.x \
                        pc-bios/proll.elf \
-                       pc-bios/linux_boot.bin "$(datadir)"
-	mkdir -p "$(docdir)"
-	install -m 644 qemu-doc.html  qemu-tech.html "$(docdir)"
+                       pc-bios/linux_boot.bin; do \
+		$(INSTALL) -m 644 $$i "$(DESTDIR)$(datadir)"; done
+	mkdir -p "$(DESTDIR)$(docdir)"
+	install -m 644 qemu-doc.html  qemu-tech.html "$(DESTDIR)$(docdir)"
 ifndef CONFIG_WIN32
-	mkdir -p "$(mandir)/man1"
-	install qemu.1 qemu-img.1 "$(mandir)/man1"
-	mkdir -p "$(datadir)/keymaps"
-	install -m 644 $(addprefix keymaps/,$(KEYMAPS)) "$(datadir)/keymaps"
+	mkdir -p "$(DESTDIR)$(mandir)/man1"
+	install qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
+	mkdir -p "$(DESTDIR)$(datadir)/keymaps"
+	install -m 644 $(addprefix keymaps/,$(KEYMAPS)) "$(DESTDIR)$(datadir)/keymaps"
 endif
 	for d in $(TARGET_DIRS); do \
 	$(MAKE) -C $$d $@ || exit 1 ; \

Index: Makefile.target
===================================================================
RCS file: /cvsroot/qemu/qemu/Makefile.target,v
retrieving revision 1.86

Makefile.target +1 -1
diff -u -u -r1.86 Makefile.target
@@ -451,7 +451,7 @@
 
 install: all 
 ifneq ($(PROGS),)
-	install -m 755 -s $(PROGS) "$(bindir)"
+	install -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)"
 endif
 
 ifneq ($(wildcard .depend),)
#1 lore raw
Quoted 1 line · Patrick Mauritz

the attached patch against cvs contains two changes:

sorry, some local changes leaked in here, "$(INSTALL)" should be "install", of course.
this change is minor enough that I don't think it's necessary to send yet another patch.

patrick mauritz