From: Mike Frysinger Date: Mon, 4 Feb 2008 17:44:23 -0500 Subject: [U-Boot-Users] [patch] only update version header as needed Message-ID: <200802041744.24211.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Constantly rebuilding the version header will force useless relinking, so we simply need to compare the new header with the existing one before updating it. Signed-off-by: Mike Frysinger --- diff --git a/Makefile b/Makefile index 0f6cc59..7655b23 100644 --- a/Makefile +++ b/Makefile @@ -337,7 +337,8 @@ $(VERSION_FILE): echo -n "$(U_BOOT_VERSION)" ; \ echo -n $(shell $(CONFIG_SHELL) $(TOPDIR)/tools/setlocalversion \ $(TOPDIR)) ; \ - echo "\"" ) > $(VERSION_FILE) + echo "\"" ) > $@.tmp + @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@ gdbtools: $(MAKE) -C tools/gdb all || exit 1