add 2 helper macros to deal with libtool madness
[openwrt-10.03/.git] / include / target.mk
index d0f7b9bc2b597c395caa95e1fcc237c90ffb96e2..b0a178e306d409319d0797fa11fe68c7edcc0a80 100644 (file)
@@ -1,23 +1,21 @@
 # 
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2007 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
 
-include $(TMP_DIR)/.target.mk
-
 define AddProfile
-  ifeq ($(CONFIG_LINUX_$(call confname,$(KERNEL)_$(1))),y)
-    PROFILE=$(1)
+  ifeq ($(CONFIG_LINUX_$(1)),y)
+    $(call Profile/$(1))
+    PROFILE=$$(ID)
   endif
 endef
 
+-include $(TMP_DIR)/.target.mk
+
 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