How to print a var using echo o print in a NDK-build Android.mk file to debug compilation?

vgonisanz picture vgonisanz · Feb 29, 2012 · Viewed 50.4k times · Source

I'm trying to print some extra info when in compile a library using ndk-build.

For example:

LOCAL_PATH := $(call my-dir)
all:;echo $(LOCAL_PATH)
echo: $(LOCAL_PATH)
print:echo "i'm not working"

When i do ndk-build, just compile all the Android.mk, but i don't get the console echo. I have readed the GNU make info (ndk-build is just a tiny GNU make), and some post whom said echo must work using a $(VAR) but it's not working on my case.

Some idea?

Answer

Andrey Kamaev picture Andrey Kamaev · Feb 29, 2012

Use

LOCAL_PATH := $(call my-dir)
$(warning $(LOCAL_PATH))