some minor fixes, cleanups, package build abstraction
[openwrt-10.03/.git] / include / target.mk
index 8f072d0cd86de99bbc6bdca509a82d7fd6329cbd..1590b9109190027dd3a5e395f6407db83b83a677 100644 (file)
@@ -75,9 +75,11 @@ define Profile
   endif
 endef
 
--include $(PLATFORM_DIR)/profiles/*.mk
-ifneq ($(PLATFORM_DIR),$(PLATFORM_SUBDIR))
-  -include $(PLATFORM_SUBDIR)/profiles/*.mk
+ifeq ($(DUMP)$(if $(TARGET_BUILD),,1),)
+  -include $(PLATFORM_DIR)/profiles/*.mk
+  ifneq ($(PLATFORM_DIR),$(PLATFORM_SUBDIR))
+    -include $(PLATFORM_SUBDIR)/profiles/*.mk
+  endif
 endif
 
 $(eval $(call shexport,Target/Description))
@@ -87,7 +89,7 @@ include $(INCLUDE_DIR)/kernel-version.mk
 GENERIC_PLATFORM_DIR := $(TOPDIR)/target/linux/generic-$(KERNEL)
 GENERIC_PATCH_DIR := $(GENERIC_PLATFORM_DIR)/patches$(shell [ -d "$(GENERIC_PLATFORM_DIR)/patches-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true )
 
-GENERIC_LINUX_CONFIG:=$(firstword $(wildcard $(GENERIC_PLATFORM_DIR)/config-$(KERNEL_PATCHVER) $(GENERIC_PLATFORM_DIR)/config-default))
+GENERIC_LINUX_CONFIG?=$(firstword $(wildcard $(GENERIC_PLATFORM_DIR)/config-$(KERNEL_PATCHVER) $(GENERIC_PLATFORM_DIR)/config-default))
 LINUX_CONFIG?=$(firstword $(wildcard $(foreach subdir,$(PLATFORM_DIR) $(PLATFORM_SUBDIR),$(subdir)/config-$(KERNEL_PATCHVER) $(subdir)/config-default)))
 LINUX_SUBCONFIG?=$(firstword $(wildcard $(PLATFORM_SUBDIR)/config-$(KERNEL_PATCHVER) $(PLATFORM_SUBDIR)/config-default))
 ifeq ($(LINUX_CONFIG),$(LINUX_SUBCONFIG))