I am building Froyo, is it possible that during building, make/python can output the file and the command it is calling right now.
For example, in one of the Android.mk, there is a line, says, echo build success. On the monitor it will show "build success", what I want is that in addition, it shows "Android.mk line 20: echo build success".
Is it possible?
The message parser of the android make comment accepts info and warning tags in your Android.mk.
For example, If you want to print the value of an internal variable:
LOCAL_CFLAGS := -DHAVE_ERRNO_H -g
$(info value of LOCAL_CFLAGS is: $(LOCAL_CFLAGS))
the info tells the compiler to print info debug output.
You can do the same with warning and error
$(warning value of LOCAL_CFLAGS is: $(LOCAL_CFLAGS))
would print a highlighted warning message
and
$(error value of LOCAL_CFLAGS is: $(LOCAL_CFLAGS))
would print the message and stop the build.
I've just experienced an odd effect of using $(info) when compiling a java+C++ Android application:
I used $info) to output some informations about conditional compiling in the Android.mk of the main application and when trying to debug the native part of the program, using ndk-gdb, it failed because apparently the output of $(info) is read by the ndk-gdb script (using the get_build_var() and get_build_var_for_abi() functions). THe result is that the ndk-gdb script is not executed properly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With