zouboan commented on code in PR #1407: URL: https://github.com/apache/incubator-nuttx-apps/pull/1407#discussion_r1029461232
########## Make.defs: ########## @@ -21,27 +21,22 @@ TOPDIR ?= $(APPDIR)/import include $(TOPDIR)/Make.defs -# The GNU make CURDIR will always be a POSIX-like path with forward slashes -# as path segment separators. This is fine for the above inclusions but -# will cause problems later for the native build. If we know that this is -# a native build, then we need to fix up the APPDIR path for subsequent -# use - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) -APPDIR := ${shell echo %CD%} -endif - # Application Directories # BUILDIRS is the list of top-level directories containing Make.defs files # CLEANDIRS is the list of all top-level directories containing Makefiles. # It is used only for cleaning. -BUILDIRS := $(dir $(wildcard $(APPDIR)$(DELIM)*$(DELIM)Make.defs)) -BUILDIRS := $(filter-out $(APPDIR)$(DELIM)import$(DELIM),$(BUILDIRS)) -CONFIGDIRS := $(filter-out $(APPDIR)$(DELIM)builtin$(DELIM),$(BUILDIRS)) -CONFIGDIRS := $(filter-out $(dir $(wildcard $(APPDIR)$(DELIM)*$(DELIM)Kconfig)),$(CONFIGDIRS)) Review Comment: In Windows environment `DELIM := \` but` \ `has two role in Windows environment: first: `\ `as directory separator, and second `\` as Escape character in Windows environment: `BUILDIRS := $(dir $(wildcard $(APPDIR)$(DELIM)*$(DELIM)Make.defs))` equivalent to `BUILDIRS := $(dir $(wildcard $(APPDIR)\*\Make.defs))` and the `\` of `\*` was identified to be Escape character, which result the `* ` was identified to be ordinary characters not used for pattern. and then result the BUILDIRS to be empty. As described in: [https://www.gnu.org/software/make/manual/html_node/Text-Functions.html](url) we can use double $(DELIM) to solve problem, and i succeed resolved a similar problem in commit f91c2383d67ff89f694e51bc59d11f226764be46 but when i use same method in apps/Make.defs , it give extra problem @hartmannathan @xiaoxiang781216 -- 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