X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/ceee90ffd2f7913e6b31789b53f52a3d94ecece3..fb4d0a4ce7137bb95bf193b3c44ab5b7e86561bc:/include/target.mk diff --git a/include/target.mk b/include/target.mk index 8f072d0cd..9ee369d9b 100644 --- a/include/target.mk +++ b/include/target.mk @@ -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)) @@ -87,7 +101,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)) @@ -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)'; \