image-commands.mk: Use ERROR_MESSAGE for imagesize fails
[openwrt/staging/chunkeey.git] / include / image-commands.mk
index 485d870f050a83db2fa7a264f600b99e31d1eece..939f5ef2db4db7afeab6f0009d926aef3055d906 100644 (file)
@@ -191,7 +191,7 @@ define Build/check-size
        @imagesize="$$(stat -c%s $@)"; \
        limitsize="$$(($(subst k,* 1024,$(subst m, * 1024k,$(if $(1),$(1),$(IMAGE_SIZE))))))"; \
        [ $$limitsize -ge $$imagesize ] || { \
-               echo "WARNING: Image file $@ is too big: $$imagesize > $$limitsize" >&2; \
+               $(call ERROR_MESSAGE,    WARNING: Image file $@ is too big: $$imagesize > $$limitsize); \
                rm -f $@; \
        }
 endef