diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2015-05-06 12:32:04 -0700 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-05-07 09:49:40 +0200 |
commit | c66574342dacbdb755ac8193057fc34e9b175c0b (patch) | |
tree | 80274686f87ea50df7ceabf2080d769ffa3c2986 /scripts | |
parent | 059098fe07e06d5ebec484a5b4747197955b53ce (diff) | |
download | barebox-c66574342dacbdb755ac8193057fc34e9b175c0b.tar.gz barebox-c66574342dacbdb755ac8193057fc34e9b175c0b.tar.xz |
Makefile.lib: Make 'check_file_size' more flexible
Make 'check_file_size' more flexible by not hardcoding the file whose
size is going to be checked to '$@'. This way it is possible to use
this subroutine to check the size of files other than the target of
the rule.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.lib | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 57426d0302..e991f33691 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -388,10 +388,10 @@ quiet_cmd_ln = LN $@ cmd_ln = ln -sf $< $@ # Check size of a file -quiet_cmd_check_file_size = CHKSIZE $@ +quiet_cmd_check_file_size = CHKSIZE $2 cmd_check_file_size = set -e; \ - size=`stat -c%s $@`; \ - max_size=`printf "%d" $2`; \ + size=`stat -c%s $2`; \ + max_size=`printf "%d" $3`; \ if [ $$size -gt $$max_size ] ; \ then \ echo "$@ size $$size > of the maximum size $$max_size" >&2; \ |