summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-01-29 23:19:50 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-01-29 23:19:50 +0100
commit4db0a48aec0f6dbc4e75c73cd086d113c853452f (patch)
tree37f24039b4bd21534e91956487ed79c1eea5456d /scripts
parent53f1d60627c8dfae835c2a7e3a9b7af132da3e64 (diff)
parentdc3400f53f3a6edd3de29be055de970871fb9562 (diff)
downloadbarebox-4db0a48aec0f6dbc4e75c73cd086d113c853452f.tar.gz
barebox-4db0a48aec0f6dbc4e75c73cd086d113c853452f.tar.xz
Merge branch 'pu/omap' into for-next/omap
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.lib11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 14e471d17c..f7d672160c 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -248,3 +248,14 @@ cmd_disasm = $(OBJDUMP) -d $< > $@
quiet_cmd_ln = LN $@
cmd_ln = ln -sf $< $@
+
+# Check size of a file
+quiet_cmd_check_file_size = CHKSIZE $@
+ cmd_check_file_size = set -e; \
+ size=`stat -c%s $@`; \
+ max_size=`printf "%d" $2`; \
+ if [ $$size -gt $$max_size ] ; \
+ then \
+ echo "$@ size $$size > of the maximum size $$max_size" >&2; \
+ exit 1 ; \
+ fi;