以下Android.mk文件可以打印$(warning $(parameter))的内容,其中parameter表示变量。
也可以写$(error $(parameter)),如:system/sepolicy/Android.mk文件中的
$(error BOARD_SEPOLICY_REPLACE is no longer supported; please remove from your BoardConfig.mk or other .mk file.)
system/extras/tests/uevents/android.mk文件
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
$(warning "the value of LOCAL_PATH is$(LOCAL_PATH)")
LOCAL_SRC_FILES := uevents.c
LOCAL_SHARED_LIBRARIES += libcutils
LOCAL_MODULE:= uevents
LOCAL_CFLAGS := -Wno-unused-parameter
include $(BUILD_EXECUTABLE)