imagebuilder: fix `make info` for empty SUPPORTED_DEVICES
authorPaul Spooren <mail@aparcar.org>
Tue, 13 Aug 2019 21:38:17 +0000 (11:38 -1000)
committerDaniel Golle <daniel@makrotopia.org>
Thu, 22 Aug 2019 19:19:04 +0000 (21:19 +0200)
For x86/64 (maybe more) target the SUPPORTED_DEVICES variable is empty
which causes the `&&` junction to fail, producing a non zero exit code.

Tested-by: Paul Spooren <mail@aparcar.org>
Fixed-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 07926d7def59e5684b488e9b614342edc19e7eb2)

target/imagebuilder/files/Makefile

index 22b2731358a31e7a635dfbfdd900e30fe8d90f7e..15b3d5c35c0665dff4c92673ca00307fa546871d 100644 (file)
@@ -76,7 +76,8 @@ USER_PROFILE ?= $(firstword $(PROFILE_NAMES))
 PROFILE_LIST = $(foreach p,$(PROFILE_NAMES), \
        echo '$(patsubst DEVICE_%,%,$(p)):'; $(if $($(p)_NAME),echo '    $(subst ','"'"',$($(p)_NAME))'; ) \
        echo '    Packages: $($(p)_PACKAGES)'; echo '    hasImageMetadata: $($(p)_HAS_IMAGE_METADATA)'; \
-       [ "$($(p)_SUPPORTED_DEVICES)" ] && echo '    SupportedDevices: $($(p)_SUPPORTED_DEVICES)'; )
+       $(if $($(p)_SUPPORTED_DEVICES),echo '    SupportedDevices: $($(p)_SUPPORTED_DEVICES)';) )
+
 
 .profiles.mk: .targetinfo
        @$(SCRIPT_DIR)/target-metadata.pl profile_mk $< '$(BOARD)$(if $(SUBTARGET),/$(SUBTARGET))' > $@