acassis commented on code in PR #18396:
URL: https://github.com/apache/nuttx/pull/18396#discussion_r2980718871
##########
boards/Board.mk:
##########
@@ -30,11 +30,35 @@ $(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),
$(if $(wildcard $(BOARD_COMMON_DIR)$(DELIM)$(raw)),
$(BOARD_COMMON_DIR)$(DELIM)$(raw), $(BOARD_DIR)$(DELIM)src$(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) $(TOPDIR)$(DELIM).config $(TOPDIR)$(DELIM)tools$(DELIM)mkpasswd.c
$(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),
$(if $(wildcard $(BOARD_COMMON_DIR)$(DELIM)$(raw)),
$(BOARD_COMMON_DIR)$(DELIM)$(raw), $(BOARD_DIR)$(DELIM)src$(DELIM)$(raw)))
$(ETCDIR)$(DELIM)$(raw)))
+ifeq ($(CONFIG_BOARD_ETC_ROMFS_PASSWD_ENABLE),y)
+ifeq ($(CONFIG_BOARD_ETC_ROMFS_PASSWD_PASSWORD),)
+ $(error CONFIG_BOARD_ETC_ROMFS_PASSWD_PASSWORD must be set when
BOARD_ETC_ROMFS_PASSWD_ENABLE is enabled. Run 'make menuconfig' to set a
password.)
+endif
+ifeq ($(CONFIG_BOARD_ETC_ROMFS_PASSWD_PASSWORD),"")
Review Comment:
Right, maybe keeping the testing only is mkpasswd is enough, but we need to
understand where is better to report the error. I think failing early is better
to let user to fix the issue. @Abhishekmishra2808 please comment your idea here
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]