Cómo imprimir un var usando echo o print en un NDK-build Android.mk archivo para depurar la compilación?


Estoy tratando de imprimir información adicional cuando compile una biblioteca usando ndk-build.

Por ejemplo:

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

Cuando hago ndk-build, simplemente compilar todos los Android.mk pero no entiendo el eco de la consola. He leído el GNU make info (ndk-build es solo un pequeño GNU make), y un post que dice que echo debe funcionar usando un VAR(VAR) pero no está funcionando en mi caso.

Alguna idea?

Author: vgonisanz, 2012-02-29

3 answers

Use

LOCAL_PATH := $(call my-dir)
$(warning $(LOCAL_PATH))
 115
Author: Andrey Kamaev,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-02-29 13:26:18

La función más correcta a llamar es "info(info ...)" :

LOCAL_PATH := $(call my-dir)
$(info $(LOCAL_PATH))
 49
Author: nellute,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-01-21 19:45:43

Las siguientes pantallas están disponibles en Android.mk:

  • error: depurar la impresión + detener la compilación
  • info: basic debug print
  • advertencia: igual que info pero muestra el número de línea donde se ha insertado

Aquí abajo algunas muestras:

$(error this is the error message that will stop the build process)
$(warning this the warning msg)
$(info this the info msg)
 21
Author: PedroSw7,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-10-05 16:07:28