Kaynağa Gözat

only update version header as needed

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 <vapier@gentoo.org>
Mike Frysinger 17 yıl önce
ebeveyn
işleme
0ec7a061fb
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      Makefile

+ 2 - 1
Makefile

@@ -343,7 +343,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