require-artifacts-in-path does not require PRODUCT_NAME/BRAND.
Also make generic_ramdisk.mk not to define them.
Test: m nothing
Change-Id: I5eff49abebe4194e3eba78557e5765e6ef2231e6
diff --git a/core/product_config.mk b/core/product_config.mk
index b9de8ca..0bb0962 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -160,15 +160,16 @@
$(call import-products, $(current_product_makefile))
endif # Import all or just the current product makefile
+# Quick check
+$(check-all-products)
+
# Import all the products that have made artifact path requirements, so that we can verify
# the artifacts they produce.
+# These are imported after check-all-products because some of them might not be real products.
$(foreach makefile,$(ARTIFACT_PATH_REQUIREMENT_PRODUCTS),\
$(if $(filter-out $(makefile),$(PRODUCTS)),$(eval $(call import-products,$(makefile))))\
)
-# Quick check
-$(check-all-products)
-
ifneq ($(filter dump-products, $(MAKECMDGOALS)),)
$(dump-products)
endif
diff --git a/target/product/generic_ramdisk.mk b/target/product/generic_ramdisk.mk
index 0698648..61e3a08 100644
--- a/target/product/generic_ramdisk.mk
+++ b/target/product/generic_ramdisk.mk
@@ -19,9 +19,6 @@
# This makefile checks that other makefiles must not install things to the
# ramdisk.
-PRODUCT_NAME := generic_ramdisk
-PRODUCT_BRAND := generic
-
# Ramdisk
PRODUCT_PACKAGES += \
init_first_stage \