adapt profiles for subtarget changes
[openwrt/svn-archive/archive.git] / include / target.mk
index 42f484af9d8d32f101572a29f1c0cc6b57eec638..8f072d0cd86de99bbc6bdca509a82d7fd6329cbd 100644 (file)
@@ -70,13 +70,17 @@ define Profile
        getvar "$(call shvar,Profile/$(1)/Description)"; \
        echo "@@"; \
        echo;
-  ifeq ($(CONFIG_TARGET_$(call target_conf,$(BOARD)_$(if $(2),$(2)_)$(1))),y)
+  ifeq ($(CONFIG_TARGET_$(call target_conf,$(BOARD)_$(if $(SUBTARGET),$(SUBTARGET)_)$(1))),y)
     PROFILE=$(1)
   endif
 endef
 
-$(eval $(call shexport,Target/Description))
+-include $(PLATFORM_DIR)/profiles/*.mk
+ifneq ($(PLATFORM_DIR),$(PLATFORM_SUBDIR))
+  -include $(PLATFORM_SUBDIR)/profiles/*.mk
+endif
 
+$(eval $(call shexport,Target/Description))
 
 include $(INCLUDE_DIR)/kernel-version.mk