Wrong path of last included makefile

650 views
Skip to first unread message

ezmora

unread,
Jul 11, 2011, 9:40:22 AM7/11/11
to android-ndk
My makefile calls some other Android.mk that builds a static library,
and then tries to include a prebuilt static library:

MY_LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_PATH := $(MY_LOCAL_PATH)
include $(LOCAL_PATH)/../../../../../some/directory/Android.mk

LOCAL_PATH := $(MY_LOCAL_PATH)
LOCAL_MODULE := aaa-prebuilt
LOCAL_SRC_FILES := $(MY_LOCAL_PATH)/../libs/libMyStaticLibrary.a
include $(PREBUILT_STATIC_LIBRARY)

I keep receiving "LOCAL_SRC_FILES points to a missing file"
When I print the value of either $(MY_LOCAL_PATH) or $(LOCAL_PATH), I
keep receiving the path of my last included makefile (../../../../../
some/directory)

According to the NDK documentation:
"IMPORTANT NOTE: Due to the way GNU Make works, this really returns
the path of the *last* *included* *Makefile* during the parsing of
build scripts."

and it is therefore recommended to use a local variable MY_LOCAL_PATH
instead of LOCAL_PATH.
That's exactly what I do and I keep getting error messages.
Any ideas?

alan

unread,
Jul 11, 2011, 9:46:29 AM7/11/11
to andro...@googlegroups.com
does /../../../../../some/directory/Android.mk also define MY_LOCAL_PATH?

David Turner

unread,
Jul 11, 2011, 1:50:58 PM7/11/11
to andro...@googlegroups.com
It looks like you're not using include $(CLEAR_VARS) before your aaa-prebuilt definition.
Maybe this is the root of the problem (and the build system is confused for other reasons)


--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.


eyal zmora

unread,
Jul 11, 2011, 2:00:28 PM7/11/11
to andro...@googlegroups.com
That was it!
Thanks Alan.

2011/7/11 alan <al...@birtles.org.uk>
does /../../../../../some/directory/Android.mk also define MY_LOCAL_PATH?

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/vvli32aLBnwJ.
Reply all
Reply to author
Forward
0 new messages