xuxin930 commented on code in PR #1979: URL: https://github.com/apache/nuttx-apps/pull/1979#discussion_r1301478217
########## Application.mk: ########## @@ -93,6 +93,35 @@ ifneq ($(BUILD_MODULE),y) OBJS += $(MAINCOBJ) $(MAINCXXOBJ) $(MAINRUSTOBJ) $(MAINZIGOBJ) endif +ifneq ($(PROGNAME),) + PROGOBJ := $(MAINCOBJ) $(MAINCXXOBJ) $(MAINRUSTOBJ) + ifneq ($(words $(PROGOBJ)), $(words $(PROGNAME))) + $(warning "program names $(PROGNAME) does not match mainsrcs $(PROGOBJ)") + endif + PROGLIST := $(addprefix $(BINDIR)$(DELIM),$(PROGNAME)) + REGLIST := $(addprefix $(BUILTIN_REGISTRY)$(DELIM),$(addsuffix .bdat,$(PROGNAME))) + + NLIST := $(shell seq 1 $(words $(PROGNAME))) + $(foreach IDX, $(NLIST), \ Review Comment: > Change IDX to i, so we can simplify the variable reference to $i? Done✅ ########## Application.mk: ########## @@ -93,6 +93,35 @@ ifneq ($(BUILD_MODULE),y) OBJS += $(MAINCOBJ) $(MAINCXXOBJ) $(MAINRUSTOBJ) $(MAINZIGOBJ) endif +ifneq ($(PROGNAME),) + PROGOBJ := $(MAINCOBJ) $(MAINCXXOBJ) $(MAINRUSTOBJ) + ifneq ($(words $(PROGOBJ)), $(words $(PROGNAME))) + $(warning "program names $(PROGNAME) does not match mainsrcs $(PROGOBJ)") + endif + PROGLIST := $(addprefix $(BINDIR)$(DELIM),$(PROGNAME)) + REGLIST := $(addprefix $(BUILTIN_REGISTRY)$(DELIM),$(addsuffix .bdat,$(PROGNAME))) + + NLIST := $(shell seq 1 $(words $(PROGNAME))) + $(foreach IDX, $(NLIST), \ Review Comment: > Change IDX to i, so we can simplify the variable reference to $i? Done✅ -- 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]
