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

前端 未结 3 1883
误落风尘
误落风尘 2021-01-30 00:46

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: $         


        
相关标签:
3条回答
  • 2021-01-30 01:18

    The following displays are available in Android.mk:

    • error: debug print + stop the build
    • info: basic debug print
    • warning: same as info but displays the line number where it's been inserted

    Here below some samples:

    $(error this is the error message that will stop the build process)
    $(warning this the warning msg)
    $(info this the info msg)
    
    0 讨论(0)
  • 2021-01-30 01:30

    The more correct function to call is "$(info ...)" :

    LOCAL_PATH := $(call my-dir)
    $(info $(LOCAL_PATH))
    
    0 讨论(0)
  • 2021-01-30 01:36

    Use

    LOCAL_PATH := $(call my-dir)
    $(warning $(LOCAL_PATH))
    
    0 讨论(0)
提交回复
热议问题