From 3f872807bff8367c4adb7bc482971428a6eb8ca2 Mon Sep 17 00:00:00 2001 From: chenrun1 Date: Thu, 18 Jan 2024 16:41:38 +0800 Subject: [PATCH] sh:Change expansion path logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We will first check whether the target file path exists. If it does not exist, we will check whether the common exists. If not, we will restore the path that should be spliced ​​at the beginning. Signed-off-by: chenrun1 --- boards/Board.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boards/Board.mk b/boards/Board.mk index 4efc93454b..f355bc1fe4 100644 --- a/boards/Board.mk +++ b/boards/Board.mk @@ -30,11 +30,11 @@ $(RCOBJS): $(ETCDIR)$(DELIM)%: % $(Q) mkdir -p $(dir $@) $(call PREPROCESS, $<, $@) -$(ETCSRC): $(foreach raw,$(RCRAWS), $(if $(wildcard $(BOARD_DIR)$(DELIM)src$(DELIM)$(raw)), $(BOARD_DIR)$(DELIM)src$(DELIM)$(raw), $(BOARD_COMMON_DIR)$(DELIM)$(raw))) $(RCOBJS) +$(ETCSRC): $(foreach raw,$(RCRAWS), $(if $(wildcard $(BOARD_DIR)$(DELIM)src$(DELIM)$(raw)), $(BOARD_DIR)$(DELIM)src$(DELIM)$(raw), $(if $(wildcard $(BOARD_COMMON_DIR)$(DELIM)$(raw)), $(BOARD_COMMON_DIR)$(DELIM)$(raw), $(BOARD_DIR)$(DELIM)src$(DELIM)$(raw)))) $(RCOBJS) $(foreach raw, $(RCRAWS), \ $(shell rm -rf $(ETCDIR)$(DELIM)$(raw)) \ $(shell mkdir -p $(dir $(ETCDIR)$(DELIM)$(raw))) \ - $(shell cp -rfp $(if $(wildcard $(BOARD_DIR)$(DELIM)src$(DELIM)$(raw)), $(BOARD_DIR)$(DELIM)src$(DELIM)$(raw), $(BOARD_COMMON_DIR)$(DELIM)$(raw)) $(ETCDIR)$(DELIM)$(raw))) + $(shell cp -rfp $(if $(wildcard $(BOARD_DIR)$(DELIM)src$(DELIM)$(raw)), $(BOARD_DIR)$(DELIM)src$(DELIM)$(raw), $(if $(wildcard $(BOARD_COMMON_DIR)$(DELIM)$(raw)), $(BOARD_COMMON_DIR)$(DELIM)$(raw), $(BOARD_DIR)$(DELIM)src$(DELIM)$(raw))) $(ETCDIR)$(DELIM)$(raw))) $(Q) genromfs -f romfs.img -d $(ETCDIR)$(DELIM)$(CONFIG_ETC_ROMFSMOUNTPT) -V "NSHInitVol" $(Q) echo "#include " > $@ $(Q) xxd -i romfs.img | sed -e "s/^unsigned char/const unsigned char aligned_data(4)/g" >> $@