All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] - use -p with INSTALL to reduce rebuilds
@ 2007-03-06 18:38 Ben Thomas
  2007-03-06 19:19 ` Keir Fraser
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Thomas @ 2007-03-06 18:38 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 811 bytes --]

I do a fair number of builds, and also build other, user applications
based upon libraries and .h files.  The attached patch adds the -p
option to install to retain the source file times. This prevents
unnecessary rebuilds.  Additionally, a few errant INSTALL and install
lines are cleaned up.

An optional approach would be to modify the base INSTALL definition,
but I chose to use the more specific approach in the patch.  FUD is
a powerful force.

-- 
------------------------------------------------------------------------
Ben Thomas                                         Virtual Iron Software
bthomas@virtualiron.com                            Tower 1, Floor 2
978-849-1214                                       900 Chelmsford Street
                                                    Lowell, MA 01851

[-- Attachment #2: xen-install_data_def.patch --]
[-- Type: text/x-patch, Size: 2755 bytes --]

This patch addresses three related issues:

- convert raw "install" command to use $(INSTALL)

- convert some $(INSTALL) to $(INSTALL_DATA) as appropriate

- finally, modify the specific $(INSTALL) definitions to use -p.
  This modification preserves dates. It has been observed that a number
  of unnecessary rebuilds take place due to install modifying the
  destination date. Preserving the source date information (-p) prevents
  these rebuilds.

Signed-off-by: Ben Thomas (ben@virtualiron.com)

diff -r a05519dd8d69 config/StdGNU.mk
--- a/config/StdGNU.mk	Thu Mar 01 15:56:12 2007 -0500
+++ b/config/StdGNU.mk	Fri Mar 02 14:27:08 2007 -0500
@@ -12,9 +12,9 @@ MSGFMT     = msgfmt
 MSGFMT     = msgfmt
 
 INSTALL      = install
-INSTALL_DIR  = $(INSTALL) -d -m0755
-INSTALL_DATA = $(INSTALL) -m0644
-INSTALL_PROG = $(INSTALL) -m0755
+INSTALL_DIR  = $(INSTALL) -d -m0755 -p
+INSTALL_DATA = $(INSTALL) -m0644 -p
+INSTALL_PROG = $(INSTALL) -m0755 -p
 
 LIB64DIR = lib64
 
diff -r a05519dd8d69 tools/guest-headers/Makefile
--- a/tools/guest-headers/Makefile	Thu Mar 01 15:56:12 2007 -0500
+++ b/tools/guest-headers/Makefile	Fri Mar 02 14:27:56 2007 -0500
@@ -13,7 +13,7 @@ check:
 
 install-Linux:
 	mkdir -p $(DESTDIR)/usr/include/xen/linux
-	install -m0644 $(linuxsparsetree)/include/xen/public/*.h $(DESTDIR)/usr/include/xen/linux
+	$(INSTALL_DATA) $(linuxsparsetree)/include/xen/public/*.h $(DESTDIR)/usr/include/xen/linux
 
 install-SunOS:
 
diff -r a05519dd8d69 tools/ioemu/Makefile
--- a/tools/ioemu/Makefile	Thu Mar 01 15:56:12 2007 -0500
+++ b/tools/ioemu/Makefile	Fri Mar 02 14:33:11 2007 -0500
@@ -65,10 +65,10 @@ common  de-ch  es     fo  fr-ca  hu     
 
 install-doc: $(DOCS)
 	mkdir -p "$(DESTDIR)$(docdir)"
-	$(INSTALL) -m 644 qemu-doc.html  qemu-tech.html "$(DESTDIR)$(docdir)"
+	$(INSTALL_DATA) qemu-doc.html  qemu-tech.html "$(DESTDIR)$(docdir)"
 ifndef CONFIG_WIN32
 	mkdir -p "$(DESTDIR)$(mandir)/man1"
-	$(INSTALL) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
+	$(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
 endif
 
 install: all $(if $(BUILD_DOCS),install-doc)
@@ -77,12 +77,12 @@ install: all $(if $(BUILD_DOCS),install-
 #	mkdir -p "$(DESTDIR)$(datadir)"
 #	for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
 #			video.x openbios-sparc32 linux_boot.bin; do \
-#		$(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
+#		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
 #	done
 ifndef CONFIG_WIN32
 	mkdir -p "$(DESTDIR)$(datadir)/keymaps"
 	for x in $(KEYMAPS); do \
-		$(INSTALL) -m 644 $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
+		$(INSTALL_DATA) $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
 	done
 endif
 	for d in $(TARGET_DIRS); do \

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-06 19:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-06 18:38 [PATCH] - use -p with INSTALL to reduce rebuilds Ben Thomas
2007-03-06 19:19 ` Keir Fraser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.