zouboan commented on code in PR #7572:
URL: https://github.com/apache/incubator-nuttx/pull/7572#discussion_r1028219229


##########
libs/libc/Makefile:
##########
@@ -115,7 +115,7 @@ endif
 BINDIR ?= bin
 
 AOBJS = $(patsubst %.S, $(BINDIR)$(DELIM)%$(OBJEXT), $(ASRCS))
-COBJS = $(patsubst %.c, $(BINDIR)$(DELIM)%$(OBJEXT), $(CSRCS))
+COBJS = $(patsubst %.c, $(BINDIR)/%$(OBJEXT), $(CSRCS))

Review Comment:
   I finally found out why Windows native build and give an error:
   makefile:132: *** target mode do not include“%”. stop.
   because in Windows environment `DELIM := $(strip \)` but `\` has two role in 
Windows environment:
   first: `\` as directory, and second `\` as Escape character
   In libc/Makefile and mm/Makefile
   `COBJS = $(patsubst %.c, $(BINDIR)$(DELIM)%$(OBJEXT), $(CSRCS))`
   In Linux is OK, but  in Windows environment will use  `DELIM := $(strip \)` 
as Escape character and then `%` is just a characters not used for pattern.
   As described in: 
[https://www.gnu.org/software/make/manual/html_node/Text-Functions.html](url)
   we can use double `$(DELIM)` to solve problem, both Windows and Linux work 
   @xiaoxiang781216 @pkarashchenko 



-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to