Fix supernod dependencies and add vbmetanod

- The supernod target incorrectly specified all the images it combines
  as dependencies. This is not wanted for a "nod" style of target which
  is meant to not care about dependencies. It is assumed the person
  knows what they are doing when using this target.
- The vbmetaimage-nodeps target did not function as it called in to a
  method which used $@ as the output name, assuming it was only used by
  the actual out/target/product/.../vbmeta.img rule. This was updated to
  take the output name as a parameter the same way the snod rule works.
- The vbmetanod target did not exist so it was added as a clone of
  vbmetaimage-nodeps.

Bug: 421360809
Signed-off-by: Travis Allen <talle112@ford.com>
(cherry picked from https://android-review.googlesource.com/q/commit:de082c523504e79bd493af1359a7d51ab5875416)
Merged-In: Ibcef8c4ac6782a94b5237982272af06c373a06f7
Change-Id: Ibcef8c4ac6782a94b5237982272af06c373a06f7
diff --git a/core/Makefile b/core/Makefile
index aff3502..18e9cc7 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -5229,6 +5229,7 @@
           $(eval $(call declare-custom-vbmeta-target,$(partition))))
 endif
 
+# $(1): output file
 define build-vbmetaimage-target
   $(call pretty,"Target vbmeta image: $(INSTALLED_VBMETAIMAGE_TARGET)")
   $(hide) mkdir -p $(AVB_CHAIN_KEY_DIR)
@@ -5237,7 +5238,7 @@
     $(INTERNAL_AVB_MAKE_VBMETA_IMAGE_ARGS) \
     $(PRIVATE_AVB_VBMETA_SIGNING_ARGS) \
     $(BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS) \
-    --output $@
+    --output $(1)
     # libavb expects to be able to read the maximum vbmeta size, so we must provide a partition
     # which matches this or the read will fail.
     # See external/avb/libavb/avb_slot_verify.c#VBMETA_MAX_SIZE
@@ -5276,17 +5277,17 @@
 	    $(BOARD_AVB_VBMETA_VENDOR_KEY_PATH) \
       $(foreach partition,$(call to-upper,$(BOARD_AVB_VBMETA_CUSTOM_PARTITIONS)),$(BOARD_AVB_VBMETA_$(partition)_KEY_PATH)) \
 	    $(BOARD_AVB_KEY_PATH)
-	$(build-vbmetaimage-target)
+	$(call build-vbmetaimage-target,$(@))
 
 $(call declare-1p-container,$(INSTALLED_VBMETAIMAGE_TARGET),)
 
 UNMOUNTED_NOTICE_DEPS += $(INSTALLED_VBMETAIMAGE_TARGET)
 
-.PHONY: vbmetaimage-nodeps
-vbmetaimage-nodeps: PRIVATE_AVB_VBMETA_SIGNING_ARGS := \
+.PHONY: vbmetaimage-nodeps vbmetanod
+vbmetaimage-nodeps vbmetanod: PRIVATE_AVB_VBMETA_SIGNING_ARGS := \
     --algorithm $(BOARD_AVB_ALGORITHM) --key $(BOARD_AVB_KEY_PATH)
-vbmetaimage-nodeps:
-	$(build-vbmetaimage-target)
+vbmetaimage-nodeps vbmetanod:
+	$(call build-vbmetaimage-target,$(INSTALLED_VBMETAIMAGE_TARGET))
 endif # BUILDING_VBMETA_IMAGE
 
 endif # BOARD_AVB_ENABLE
@@ -7590,7 +7591,7 @@
 # Build $(PRODUCT_OUT)/super.img without dependencies.
 .PHONY: superimage-nodeps supernod
 superimage-nodeps supernod: intermediates :=
-superimage-nodeps supernod: | $(INSTALLED_SUPERIMAGE_DEPENDENCIES)
+superimage-nodeps supernod: | $(LPMAKE) $(BUILD_SUPER_IMAGE)
 	$(call pretty,"make $(INSTALLED_SUPERIMAGE_TARGET): ignoring dependencies")
 	$(call build-superimage-target,$(INSTALLED_SUPERIMAGE_TARGET),\
 	  $(call intermediates-dir-for,PACKAGING,superimage-nodeps)/misc_info.txt)