Fix builds with enforce_vintf_kernel + !kernel

If a build has PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS
set (which is set for P+ builds) but no kernel is built,
the original code emits a warning, but it won't be able
to build target files package because it depends on
kernel_configs.txt and kernel_version.txt without any rules.

Properly clear BUILT_KERNEL_CONFIGS_FILE and BUILT_KERNEL_VERSION_FILE
so that it won't be depended on in this case.

Bug: 184128489
Test: TH + forrest

Change-Id: I4b8fbd117f114555cf606e3c3b48eb564dbe786b
diff --git a/core/Makefile b/core/Makefile
index 7975d3a..d4a4ee1 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -3937,6 +3937,9 @@
     or (2) extracting kernel configuration and defining BOARD_KERNEL_CONFIG_FILE and \
     BOARD_KERNEL_VERSION manually; or (3) unsetting PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS \
     manually.)
+# Clear their values to indicate that these two files does not exist.
+BUILT_KERNEL_CONFIGS_FILE :=
+BUILT_KERNEL_VERSION_FILE :=
 else
 
 # Tools for decompression that is not in PATH.
@@ -3981,8 +3984,10 @@
 check_vintf_compatible_deps := $(check_vintf_common_srcs)
 
 ifeq ($(PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS),true)
+ifneq (,$(BUILT_KERNEL_VERSION_FILE)$(BUILT_KERNEL_CONFIGS_FILE))
 check_vintf_compatible_args += --kernel $(BUILT_KERNEL_VERSION_FILE):$(BUILT_KERNEL_CONFIGS_FILE)
 check_vintf_compatible_deps += $(BUILT_KERNEL_CONFIGS_FILE) $(BUILT_KERNEL_VERSION_FILE)
+endif # BUILT_KERNEL_VERSION_FILE != "" || BUILT_KERNEL_CONFIGS_FILE != ""
 endif # PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS
 
 check_vintf_compatible_args += \