You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/01/17 22:44:55 UTC

[incubator-nuttx-apps] branch master updated: apps/Application.mk: Fix path calculation. (#22)

This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 8e21be5  apps/Application.mk:  Fix path calculation. (#22)
8e21be5 is described below

commit 8e21be522398a5615ef396446c6c6f1b416eaf46
Author: patacongo <sp...@yahoo.com>
AuthorDate: Fri Jan 17 16:44:46 2020 -0600

    apps/Application.mk:  Fix path calculation. (#22)
    
    The GNU make CURDIR will always be a POSIX-like path with forward slashes as path segment separators.  If we know that this is a native build, then we need to fix up the path so the DELIM will match the actual delimiter.
---
 Application.mk | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/Application.mk b/Application.mk
index 38e310e..25af192 100644
--- a/Application.mk
+++ b/Application.mk
@@ -51,7 +51,17 @@ ifneq ($(MAINSRC),)
   endif
 endif
 
-SUFFIX = $(subst $(DELIM),.,$(CURDIR))
+# The GNU make CURDIR will always be a POSIX-like path with forward slashes
+# as path segment separators.  If we know that this is a native build, then
+# we need to fix up the path so the DELIM will match the actual delimiter.
+
+ifeq ($(CONFIG_WINDOWS_NATIVE),y)
+CWD = $(strip ${shell echo %CD% | cut -d: -f2})
+else
+CWD = $(CURDIR)
+endif
+
+SUFFIX = $(subst $(DELIM),.,$(CWD))
 
 # Object files