aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2015-03-30 16:48:00 -0700
committerAndrew Hsieh <andrewhsieh@google.com>2015-03-30 16:48:00 -0700
commite871c03af3eab5a0854f86ab900cb3cda8d6c81b (patch)
tree842ec690f10f9bacbf1e68ae614c3db1672d8c2c
parentede72c15b2a94c6b899df44c330bc35205615ca0 (diff)
downloadndk-e871c03af3eab5a0854f86ab900cb3cda8d6c81b.tar.gz
Remove trailing / in project path for windows
To determin project path, ndk-build searches parent directory (recursively) if current doesn't have jni/Android.mk or AndroidManifest.xml. In that case, path is expanded to absolute, eg. C:\android-ndk\samples\hello-jni\\AndroidManifest.xml, and the \\ may fail subsequent $(wildcard ...). Remove trailing / in project path. See b.android.com/160584 Change-Id: I234b065df9bb10a10e183234dffd92299699566b
-rw-r--r--build/core/build-local.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/build/core/build-local.mk b/build/core/build-local.mk
index 384ffb779..57d986552 100644
--- a/build/core/build-local.mk
+++ b/build/core/build-local.mk
@@ -78,11 +78,11 @@ ifeq ($(HOST_OS),windows)
# $(dir C:/foo) -> C:/ (correct)
# $(dir C:\foo) -> C:\ (correct)
#
-host-dir-parent = $(strip \
+host-dir-parent = $(patsubst %/,%,$(strip \
$(eval __host_dir_node := $(patsubst %/,%,$(subst \,/,$1)))\
$(eval __host_dir_parent := $(dir $(__host_dir_node)))\
$(filter-out $1,$(__host_dir_parent))\
- )
+ ))
else
host-dir-parent = $(patsubst %/,%,$(dir $1))
endif