9
0
Fork 0

Makefile: move cmd_check_file_size to Makefile.lib

so we can use to check pbl

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2013-01-19 12:06:00 +01:00 committed by Sascha Hauer
parent 6f14250038
commit 3de3b677ee
2 changed files with 11 additions and 11 deletions

View File

@ -547,17 +547,6 @@ quiet_cmd_barebox_version = GEN .version
fi; \
$(MAKE) $(build)=common
# 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;
# Generate System.map
quiet_cmd_sysmap = SYSMAP
cmd_sysmap = $(CONFIG_SHELL) $(srctree)/scripts/mksysmap

View File

@ -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;