xuxin930 commented on code in PR #1979:
URL: https://github.com/apache/nuttx-apps/pull/1979#discussion_r1300020025


##########
Application.mk:
##########
@@ -93,6 +93,21 @@ ifneq ($(BUILD_MODULE),y)
   OBJS += $(MAINCOBJ) $(MAINCXXOBJ) $(MAINRUSTOBJ) $(MAINZIGOBJ)
 endif
 
+ifneq ($(PROGNAME),)
+  PROGOBJ := $(MAINCOBJ) $(MAINCXXOBJ) $(MAINRUSTOBJ)
+  PROGNAMELIST := $(PROGNAME)
+  ifneq ($(words $(PROGOBJ)), $(words $(PROGNAMELIST)))
+    $(warning "program names $(words $(PROGNAMELIST)) does not match mainsrcs 
$(words $(PROGOBJ)) in $(CWD)")
+  endif
+  PROGLIST := $(addprefix $(BINDIR)$(DELIM),$(PROGNAME))
+  NLIST := $(shell seq 1 $(words $(PROGOBJ)))
+  $(foreach IDX, $(NLIST), \
+    $(eval PROGKEY_$(word $(IDX),$(PROGOBJ)) := $(word 
$(IDX),$(PROGNAMELIST))) \
+    $(eval ELFPROGKEY_$(word $(IDX),$(PROGLIST)) := $(word $(IDX),$(PROGOBJ))) 
\
+  )
+  else

Review Comment:
   > why add else
   
   **Removed**
   editor careless, my mistake



-- 
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]

Reply via email to