summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2012-11-08 10:19:09 +0000
committerTom Rini <trini@ti.com>2012-12-06 13:56:39 -0700
commitd060e6f4416e667d718ad60636fdf6cbf5f1f576 (patch)
treef20f8029a8f5a0c6406befe52ba9ddf071913a8b
parent33699df12cbcd9bfa609dc7fb5a0a69c029449e9 (diff)
downloadu-boot-imx-d060e6f4416e667d718ad60636fdf6cbf5f1f576.zip
u-boot-imx-d060e6f4416e667d718ad60636fdf6cbf5f1f576.tar.gz
u-boot-imx-d060e6f4416e667d718ad60636fdf6cbf5f1f576.tar.bz2
Allow CONFIG_BOARD_SIZE_LIMIT to be specified in hex
Use the printf command to convert the number in any valid format into the expected decimal format. The resulting errors should be printed to stderr. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
-rw-r--r--Makefile10
1 files changed, 5 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 2132ebf..de96861 100644
--- a/Makefile
+++ b/Makefile
@@ -390,12 +390,12 @@ __LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD))
ifneq ($(CONFIG_BOARD_SIZE_LIMIT),)
BOARD_SIZE_CHECK = \
@actual=`wc -c $@ | awk '{print $$1}'`; \
- limit=$(CONFIG_BOARD_SIZE_LIMIT); \
+ limit=`printf "%d" $(CONFIG_BOARD_SIZE_LIMIT)`; \
if test $$actual -gt $$limit; then \
- echo "$@ exceeds file size limit:"; \
- echo " limit: $$limit bytes"; \
- echo " actual: $$actual bytes"; \
- echo " excess: $$((actual - limit)) bytes"; \
+ echo "$@ exceeds file size limit:" >&2 ; \
+ echo " limit: $$limit bytes" >&2 ; \
+ echo " actual: $$actual bytes" >&2 ; \
+ echo " excess: $$((actual - limit)) bytes" >&2; \
exit 1; \
fi
else