image.mk: fix emitting profiles for targets that have no subtargets
authorFelix Fietkau <nbd@nbd.name>
Sun, 15 May 2016 15:44:10 +0000 (17:44 +0200)
committerFelix Fietkau <nbd@nbd.name>
Sun, 15 May 2016 15:47:06 +0000 (17:47 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
include/image.mk
include/target.mk

index 67879b37805e308ddfbe6f760245479fd0e17dcd..7dbaa7818c7fa350f77bfbfe151d2875cc2643bf 100644 (file)
@@ -20,7 +20,6 @@ DTS_DIR:=$(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts
 
 sanitize = $(call tolower,$(subst _,-,$(1)))
 
-SUBTARGET ?= default
 DIST_SANITIZED:=$(call sanitize,$(VERSION_DIST))
 EXTRA_NAME_SANITIZED=$(call sanitize,$(EXTRA_IMAGE_NAME))
 
@@ -475,7 +474,7 @@ define Device/Export
 endef
 
 define Device/Check
-  _TARGET = $$(if $$(and $$(filter $(SUBTARGET),$$(SUBTARGETS)),$$(filter $(PROFILE),$$(PROFILES) DEVICE_$(1))),install,install-disabled)
+  _TARGET = $$(if $$(and $(if $(SUBTARGET),,1)$$(filter $(SUBTARGET),$$(SUBTARGETS)),$$(filter $(PROFILE),$$(PROFILES) DEVICE_$(1))),install,install-disabled)
   _COMPILE_TARGET = $$(if $(if $(IB),,$(CONFIG_IB)$$(filter $(PROFILE),$$(PROFILES) DEVICE_$(1))),compile,compile-disabled)
 endef
 
@@ -563,7 +562,7 @@ $(DEVICE_DESCRIPTION)
 
 endef
 
-DEVICE_PROFILE_CHECK=$(and $(DEVICE_TITLE),$(filter $(SUBTARGET),$(SUBTARGETS)))
+DEVICE_PROFILE_CHECK=$(and $(DEVICE_TITLE),$(if $(SUBTARGET),,1)$(filter $(SUBTARGET),$(SUBTARGETS)))
 
 define Device/Dump
 $$(eval $$(if $$(DEVICE_PROFILE_CHECK),$$(info $$(call Device/DumpInfo,$(1)))))
index 08e0a62af64eaab81e839be56156dc07149a04b0..0666df63a157f3d8d3f08b60836e90a360b4ee4e 100644 (file)
@@ -274,7 +274,7 @@ endif
 
 CUR_SUBTARGET:=$(SUBTARGET)
 ifeq ($(SUBTARGETS),)
-  CUR_SUBTARGET ?= default
+  CUR_SUBTARGET := default
 endif
 
 define BuildTargets/DumpCurrent