Cleanup boards/Makefile

Changes:
There was logic in `tools/Config.mk` which was duplicated in `boards/Makefile`.
This PR removes the duplicated logic in boards/Makefile
This commit is contained in:
Alan Rosenthal
2022-01-23 20:58:30 -05:00
committed by Xiang Xiao
parent 31b1fd5c89
commit 35905302d3
4 changed files with 26 additions and 37 deletions
+1 -28
View File
@@ -20,26 +20,6 @@
include $(TOPDIR)/Make.defs
# Determine if there is a Kconfig file for any custom board configuration
ifeq ($(CONFIG_ARCH_BOARD_CUSTOM),y)
CUSTOM_DIR = $(patsubst "%",%,$(CONFIG_ARCH_BOARD_CUSTOM_DIR))
ifeq ($(CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH),y)
CUSTOM_KPATH = $(TOPDIR)$(DELIM)$(CUSTOM_DIR)$(DELIM)Kconfig
else
CUSTOM_KPATH = $(CUSTOM_DIR)$(DELIM)Kconfig
endif
CUSTOM_KCONFIG = $(if $(wildcard $(CUSTOM_KPATH)),y,)
endif
ifeq ($(CUSTOM_KCONFIG),y)
BOARD_KCONFIG = $(CUSTOM_KPATH)
else
BOARD_KCONFIG = $(TOPDIR)$(DELIM)boards$(DELIM)dummy$(DELIM)dummy_kconfig
endif
DUMMY_KCONFIG = $(TOPDIR)$(DELIM)boards$(DELIM)dummy$(DELIM)Kconfig
# The board configuration should be installed in the arch/ directory
BOARDDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board
@@ -94,19 +74,12 @@ makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds) $(CXXSRCS:.cxx=.ddx)
depend: .depend
$(DUMMY_KCONFIG): $(BOARD_KCONFIG)
$(call DELFILE, $(DUMMY_KCONFIG))
$(call COPYFILE, $(BOARD_KCONFIG), $(DUMMY_KCONFIG))
dirlinks: $(DUMMY_KCONFIG)
context: $(DUMMY_KCONFIG)
context:
ifeq ($(BOARD_INSTALLED),y)
$(Q) $(MAKE) -C $(BOARDDIR) context
endif
clean_context:
$(call DELFILE, $(DUMMY_KCONFIG))
clean: clean_context
$(call DELFILE, $(BIN))