build: fix empty SUBTARGET in json files
authorPaul Spooren <mail@aparcar.org>
Wed, 12 Feb 2020 03:27:24 +0000 (17:27 -1000)
committerPetr Štetiar <ynezz@true.cz>
Thu, 13 Feb 2020 16:45:46 +0000 (17:45 +0100)
Some targets like kirkwood or omap don't use a subtarget which results
in a malformed JSON info file.

Instead of having a valid value like `"target": "ath79/tiny"` for these
targets the value is `"target": "kirkwood/"`.

This patch uses the same if condition to use `generic` if the subtarget
is empty.

Tested for the kirkwood target.

Signed-off-by: Paul Spooren <mail@aparcar.org>
include/image.mk

index 46d592e8dca872ddf02b28be0e1a6e5c966b6d2d..fd04d4020bf6ca1d87f9159bf680d0a7d233bccd 100644 (file)
@@ -588,7 +588,7 @@ define Device/Build/image
                DEVICE_ALT2_VARIANT="$(DEVICE_ALT2_VARIANT)" \
                DEVICE_TITLE="$(DEVICE_TITLE)" \
                TARGET="$(BOARD)" \
-               SUBTARGET="$(SUBTARGET)" \
+               SUBTARGET="$(if $(SUBTARGET),$(SUBTARGET),generic)" \
                VERSION_NUMBER="$(VERSION_NUMBER)" \
                VERSION_CODE="$(VERSION_CODE)" \
                SUPPORTED_DEVICES="$(SUPPORTED_DEVICES)" \