summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2015-05-06 12:32:04 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2015-05-07 09:49:40 +0200
commitc66574342dacbdb755ac8193057fc34e9b175c0b (patch)
tree80274686f87ea50df7ceabf2080d769ffa3c2986 /arch
parent059098fe07e06d5ebec484a5b4747197955b53ce (diff)
downloadbarebox-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 'arch')
-rw-r--r--arch/arm/pbl/Makefile2
-rw-r--r--arch/mips/pbl/Makefile2
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/pbl/Makefile b/arch/arm/pbl/Makefile
index 4c1788dd9d..1ff39dbdfe 100644
--- a/arch/arm/pbl/Makefile
+++ b/arch/arm/pbl/Makefile
@@ -22,7 +22,7 @@ endif
$(obj)/zbarebox.bin: $(obj)/zbarebox FORCE
$(call if_changed,objcopy)
- $(call cmd,check_file_size,$(CONFIG_BAREBOX_MAX_IMAGE_SIZE))
+ $(call cmd,check_file_size,$@,$(CONFIG_BAREBOX_MAX_IMAGE_SIZE))
$(Q)$(kecho) ' Barebox: fix size'
$(Q)$(objtree)/scripts/fix_size -i -f $(objtree)/$@ $(FIX_SIZE)
$(Q)$(kecho) ' Barebox: $@ is ready'
diff --git a/arch/mips/pbl/Makefile b/arch/mips/pbl/Makefile
index fea1f249bb..b03bca1258 100644
--- a/arch/mips/pbl/Makefile
+++ b/arch/mips/pbl/Makefile
@@ -15,7 +15,7 @@ extra-y += piggy.gzip piggy.lz4 piggy.lzo piggy.lzma piggy.xzkern piggy.sh
$(obj)/zbarebox.bin: $(obj)/zbarebox FORCE
$(call if_changed,objcopy)
- $(call cmd,check_file_size,$(CONFIG_BAREBOX_MAX_IMAGE_SIZE))
+ $(call cmd,check_file_size,$@,$(CONFIG_BAREBOX_MAX_IMAGE_SIZE))
$(Q)$(kecho) ' Barebox: $@ is ready'
$(obj)/zbarebox.S: $(obj)/zbarebox FORCE