Android.mk: add required header files to LOCAL_ADDITIONAL_DEPENDENCIES
Using $(LOCAL_PATH)/host/xtest/regression_8100.c as a target is not
allowed by AOSP document "Build System Changes for Android.mk Writers" [1]
("2. The target is a real file, but it's outside the output directories").
Fixes the following build error:
external/optee_test/Android.mk:71: error: writing to readonly directory: "external/optee_test/host/xtest/regression_8100.c"
Link: [1] https://android.googlesource.com/platform/build/+/4c9399d9889e/Changes.md#phony_targets
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
[jf: edit commit message]
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
diff --git a/Android.mk b/Android.mk
index e371cf8..1476426 100644
--- a/Android.mk
+++ b/Android.mk
@@ -65,7 +65,8 @@
@echo ' GEN $$@'
@$(LOCAL_PATH)/scripts/file_to_c.py --inf $$< --out $$@ --name $(1)
-$(LOCAL_PATH)/host/xtest/regression_8100.c: $(TARGET_OUT_HEADERS)/$(1).h
+LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_HEADERS)/$(1).h
+
endef
$(eval $(call my-embed-file,regression_8100_ca_crt,cert/ca.crt))
@@ -107,7 +108,7 @@
## out/target/product/hikey/optee/arm-plat-hikey/core/tee.bin
## it will be generated after build the optee_os with target BUILD_OPTEE_OS
## which is defined in the common ta build mk file included before,
-LOCAL_ADDITIONAL_DEPENDENCIES := $(OPTEE_BIN)
+LOCAL_ADDITIONAL_DEPENDENCIES += $(OPTEE_BIN)
include $(BUILD_EXECUTABLE)