allow targets to select/deselect config symbols
[openwrt/svn-archive/archive.git] / include / target.mk
index c8eb76c254c03089e59347a0aa4e7f849caecc5f..9ee369d9b123ee31c508e8f77fc8cecb392d942d 100644 (file)
@@ -1,4 +1,4 @@
-# 
+#
 # Copyright (C) 2007 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
@@ -75,9 +75,23 @@ define Profile
   endif
 endef
 
--include $(PLATFORM_DIR)/profiles/*.mk
 ifneq ($(PLATFORM_DIR),$(PLATFORM_SUBDIR))
-  -include $(PLATFORM_SUBDIR)/profiles/*.mk
+  define IncludeProfiles
+    -include $(PLATFORM_DIR)/profiles/*.mk
+    -include $(PLATFORM_SUBDIR)/profiles/*.mk
+  endef
+else
+  define IncludeProfiles
+    -include $(PLATFORM_DIR)/profiles/*.mk
+  endef
+endif
+
+ifeq ($(TARGET_BUILD),1)
+  $(eval $(call IncludeProfiles))
+else
+  ifeq ($(DUMP),)
+    $(eval $(call IncludeProfiles))
+  endif
 endif
 
 $(eval $(call shexport,Target/Description))
@@ -136,6 +150,7 @@ define BuildTargets/DumpCurrent
         echo 'Target-Path: $(subst $(TOPDIR)/,,$(PWD))'; \
         echo 'Target-Arch: $(ARCH)'; \
         echo 'Target-Features: $(FEATURES)'; \
+        echo 'Target-Depends: $(DEPENDS)'; \
         echo 'Linux-Version: $(LINUX_VERSION)'; \
         echo 'Linux-Release: $(LINUX_RELEASE)'; \
         echo 'Linux-Kernel-Arch: $(LINUX_KARCH)'; \