Merge "Doc fixes"
diff --git a/build/core/clear-vars.mk b/build/core/clear-vars.mk
index e9ad319..08c3b19 100644
--- a/build/core/clear-vars.mk
+++ b/build/core/clear-vars.mk
@@ -20,3 +20,6 @@
 
 # Note: As a special exception, we don't want to clear LOCAL_PATH
 $(call clear-vars, $(filter-out LOCAL_PATH,$(modules-LOCALS:%=LOCAL_%)))
+
+# strip LOCAL_PATH
+LOCAL_PATH := $(strip $(LOCAL_PATH))
diff --git a/tests/build/issue42841-LOCAL_PATH/jni/Android.mk b/tests/build/issue42841-LOCAL_PATH/jni/Android.mk
new file mode 100644
index 0000000..696dad2
--- /dev/null
+++ b/tests/build/issue42841-LOCAL_PATH/jni/Android.mk
@@ -0,0 +1,12 @@
+# Note that the line LOCAL_PATH ends with trailing space and
+# cause strange error message reads:
+#
+#  make: *** No rule to make target /issue42841-LOCAL_PATH.c', needed by
+#     obj/local/armeabi/objs/issue42841-LOCAL_PATH/issue42841-LOCAL_PATH.o'.  Stop.
+#
+LOCAL_PATH := $(call my-dir) 
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := issue42841-LOCAL_PATH
+LOCAL_SRC_FILES := issue42841-LOCAL_PATH.c
+include $(BUILD_EXECUTABLE)
diff --git a/tests/build/issue42841-LOCAL_PATH/jni/Application.mk b/tests/build/issue42841-LOCAL_PATH/jni/Application.mk
new file mode 100644
index 0000000..a252a72
--- /dev/null
+++ b/tests/build/issue42841-LOCAL_PATH/jni/Application.mk
@@ -0,0 +1 @@
+APP_ABI := all
diff --git a/tests/build/issue42841-LOCAL_PATH/jni/issue42841-LOCAL_PATH.c b/tests/build/issue42841-LOCAL_PATH/jni/issue42841-LOCAL_PATH.c
new file mode 100644
index 0000000..c829b4e
--- /dev/null
+++ b/tests/build/issue42841-LOCAL_PATH/jni/issue42841-LOCAL_PATH.c
@@ -0,0 +1,18 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+int main()
+{
+}