From: Chris Packham Date: Thu, 24 Jul 2014 00:44:25 +0000 (+1200) Subject: Makefile: use $(shell ...) for determining file_size X-Git-Tag: v2014.10-rc2~172 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=67b060b46b117375b489de2112c90c456552b654;p=u-boot Makefile: use $(shell ...) for determining file_size file_size was being calculated using back-ticks but map_size uses $(shell ...). Update the file_size calculation to use $(shell ...). From: Jeroen Hofstee The binary_size_check target relies on stat -c %s to return the size of u-boot.bin. This only works with GNU stat though. Use wc instead. Signed-off-by: Chris Packham Acked-by: Simon Glass --- diff --git a/Makefile b/Makefile index 666d291137..cf88003488 100644 --- a/Makefile +++ b/Makefile @@ -803,7 +803,7 @@ u-boot.hex u-boot.srec: u-boot FORCE OBJCOPYFLAGS_u-boot.bin := -O binary binary_size_check: u-boot.bin System.map FORCE - @file_size=`stat -c %s u-boot.bin` ; \ + @file_size=$(shell wc -c u-boot.bin | awk '{print $$1}') ; \ map_size=$(shell cat System.map | \ awk '/_image_copy_start/ {start = $$1} /_image_binary_end/ {end = $$1} END {if (start != "" && end != "") print "ibase=16; " toupper(end) " - " toupper(start)}' \ | bc); \