From fa74fbcd46f1114bfc4e992eab57051c783ef8a4 Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Tue, 30 Aug 2016 00:58:39 +0200 Subject: [PATCH] Fix IMG_LZMA argument support in main Makefile --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index ac9284f..1e3b51b 100644 --- a/Makefile +++ b/Makefile @@ -82,8 +82,11 @@ $(if $(IMG_SIZE),$(strip $(IMG_SIZE)),$(strip $(1))) endef # $(1): value -define is_one -$(if $(filter $(strip $(1)),1),1,0) +define is_lzma +$(if $(IMG_LZMA),\ + $(if $(filter $(strip $(IMG_LZMA)),1),1,0),\ + $(if $(filter $(strip $(1)),1),1,0)\ +) endef # $(1): file extension @@ -148,7 +151,7 @@ endef # $(3): other parameters passed to subdir make define build args="IMG_SIZE=$$((1024*$(call img_size,$(1)))) \ - IMG_LZMA=$(call is_one,$(2)) \ + IMG_LZMA=$(strip $(call is_lzma,$(2))) \ $(strip $(3))"; \ cd $(SOURCE_DIR) && \ $(SUB_MAKE_CMD) $@ $$args && \ @@ -156,7 +159,7 @@ define build $(if $(filter $(IMG_RAM),1),\ $(call copy_img,u-boot), \ - $(if $(filter $(call is_one,$(2)),1), \ + $(if $(filter $(strip $(call is_lzma,$(2))),1), \ $(call copy_img,tuboot,$(call img_size,$(1))), \ $(call copy_img,u-boot,$(call img_size,$(1))) \ ) \ -- 2.25.1