set the PROFILE variable in target.mk appropriately
[openwrt.git] / include / target.mk
index 7f0501e..d0f7b9b 100644 (file)
@@ -7,6 +7,17 @@
 
 include $(TMP_DIR)/.target.mk
 
-$(TMP_DIR)/.target.mk:
-       $(SCRIPT_DIR)/gen_target_mk.pl < $(TMP_DIR)/.targetinfo > $@
+define AddProfile
+  ifeq ($(CONFIG_LINUX_$(call confname,$(KERNEL)_$(1))),y)
+    PROFILE=$(1)
+  endif
+endef
+
+ifeq ($(IB),1)
+$(TMP_DIR)/.target.mk: $(TOPDIR)/.target.mk
+       $(CP) $< $@
+else
+$(TMP_DIR)/.target.mk: $(TMP_DIR)/.targetinfo
+       $(SCRIPT_DIR)/metadata.pl target_mk < $(TMP_DIR)/.targetinfo > $@
+endif