From a8b0f9b685072e1d3acd01741e7db6833b445b2a Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 24 Jun 2014 22:10:52 +0900 Subject: build: define CPU only when arch/${ARCH}/cpu/${CPU} exists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The directory arch/${ARCH}/cpu/${CPU} does not exist in avr32, blackfin, microblaze, nios2, openrisc, sandbox, x86. These architectures have only one CPU type. Defining CPU should not be required for such architectures. This commit allows cpu field (= the 3rd field of boards.cfg) to be kept blank. Signed-off-by: Masahiro Yamada Cc: Andreas Bießmann Cc: Simon Glass Cc: Sonic Zhang Cc: Michal Simek Cc: Thomas Chou Cc: Stefan Kristiansson --- config.mk | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'config.mk') diff --git a/config.mk b/config.mk index 05864aabb5..bd74732d48 100644 --- a/config.mk +++ b/config.mk @@ -24,10 +24,7 @@ OBJCOPYFLAGS := # so calculate CPUDIR before including ARCH/SOC/CPU config.mk files. # Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains # CPU-specific code. -CPUDIR=arch/$(ARCH)/cpu/$(CPU) -ifneq ($(srctree)/$(CPUDIR),$(wildcard $(srctree)/$(CPUDIR))) -CPUDIR=arch/$(ARCH)/cpu -endif +CPUDIR=arch/$(ARCH)/cpu$(if $(CPU),/$(CPU),) sinclude $(srctree)/arch/$(ARCH)/config.mk # include architecture dependend rules sinclude $(srctree)/$(CPUDIR)/config.mk # include CPU specific rules -- cgit v1.2.3