Skip to contentSkip to conversation

only update version header as needed

PATCH New Mike Frysinger 2 participants 2 messages Feb 4, 2008 – Feb 14, 2008 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---

Makefile +2 -1
index 0f6cc59..7655b23 100644
@@ -337,7 +337,8 @@ $(VERSION_FILE):
 		echo -n "$(U_BOOT_VERSION)" ; \
 		echo -n $(shell $(CONFIG_SHELL) $(TOPDIR)/tools/setlocalversion \
 			 $(TOPDIR)) ; \
-		echo "\"" ) > $(VERSION_FILE)
+		echo "\"" ) > [email protected]
+		@cmp -s $@ [email protected] && rm -f [email protected] || mv -f [email protected] $@
 
 gdbtools:
 		$(MAKE) -C tools/gdb all || exit 1
#1 lore raw

PATCH 1/1 only update version header as needed

Quoted 5 lines · In message <[email protected]> you wrote:

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.

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 9 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It took him several minutes to understand any new idea  put  to  him,
and  this is a very valuable trait in a leader, because anything any-
one is still trying to explain to you after two minutes  is  probably
important  and anything they give up after a mere minute or so is al-
most certainly something they shouldn't have been bothering you  with
in the first place.                   - Terry Pratchett, _Reaper Man_