WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] - use -p with INSTALL to reduce rebuilds

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] - use -p with INSTALL to reduce rebuilds
From: Ben Thomas <bthomas@xxxxxxxxxxxxxxx>
Date: Tue, 06 Mar 2007 13:38:09 -0500
Delivery-date: Tue, 06 Mar 2007 10:37:20 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.10 (X11/20070302)
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@xxxxxxxxxxxxxxx                            Tower 1, Floor 2
978-849-1214                                       900 Chelmsford Street
                                                   Lowell, MA 01851
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@xxxxxxxxxxxxxxx)

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 \
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>