core/Makefile: Make PACK_DESKTOP_{RECOVERY,UPDATE}_IMAGE into product variable

Make the PACK_DESKTOP_UPDATE_IMAGE and PACK_DESKTOP_RECOVERY_IMAGE
variables into product variables PRODUCT_BUILD_DESKTOP_UPDATE_IMAGE and
PRODUCT_BUILD_DESKTOP_RECOVERY_IMAGE so that board specific mk files can
override the value of these variables. The original variables can only
be appended to or overridden with 'override' because we use
'inherit-product'. The use of 'inherit-product' causes the test in this
Makefile to always succeed because the variables are set to 'true' by
default. The only other way to reset these variables seems to be to use
'override <var> = ' in the board's product mk file, which isn't
preferred vs. using a product variable.

Bug: 368171802
Test: m pack-update-image; \
      m pack-recovery-image
Change-Id: Iba3bc8bf1715785662260ad7dfc0927cb3e52477
diff --git a/core/Makefile b/core/Makefile
index 25429e7..f7a4ac0 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -7976,7 +7976,7 @@
 
 # -----------------------------------------------------------------
 # Desktop pack recovery image hook.
-ifneq (,$(strip $(PACK_DESKTOP_RECOVERY_IMAGE)))
+ifeq ($(BOARD_USES_DESKTOP_RECOVERY_IMAGE),true)
 PACK_RECOVERY_IMAGE_TARGET := $(PRODUCT_OUT)/android-desktop_recovery_image.bin
 PACK_RECOVERY_IMAGE_ARGS := --noarchive --recovery
 
@@ -7997,11 +7997,11 @@
 .PHONY: pack-recovery-image
 pack-recovery-image: $(PACK_RECOVERY_IMAGE_TARGET)
 
-endif # PACK_DESKTOP_RECOVERY_IMAGE
+endif # BOARD_USES_DESKTOP_RECOVERY_IMAGE
 
 # -----------------------------------------------------------------
 # Desktop pack update image hook.
-ifneq (,$(strip $(PACK_DESKTOP_UPDATE_IMAGE)))
+ifeq ($(BOARD_USES_DESKTOP_UPDATE_IMAGE),true)
 PACK_UPDATE_IMAGE_TARGET := $(PRODUCT_OUT)/android-desktop_update_image.bin
 PACK_UPDATE_IMAGE_ARGS := --noarchive --update
 
@@ -8022,7 +8022,7 @@
 .PHONY: pack-update-image
 pack-update-image: $(PACK_UPDATE_IMAGE_TARGET)
 
-endif # PACK_DESKTOP_UPDATE_IMAGE
+endif # BOARD_USES_DESKTOP_UPDATE_IMAGE
 
 PACK_MIGRATION_IMAGE_SCRIPT := $(HOST_OUT_EXECUTABLES)/pack_migration_image