Merge "Revert^2 "Add a check for apex/allowed_deps.txt to droidcore.""
diff --git a/core/main.mk b/core/main.mk
index 9ba43f6..6a35417 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -1899,6 +1899,11 @@
 ndk: $(SOONG_OUT_DIR)/ndk.timestamp
 .PHONY: ndk
 
+# Checks that build/soong/apex/allowed_deps.txt remains up to date
+ifneq ($(UNSAFE_DISABLE_APEX_ALLOWED_DEPS_CHECK),true)
+  droidcore: ${APEX_ALLOWED_DEPS_CHECK}
+endif
+
 $(call dist-write-file,$(KATI_PACKAGE_MK_DIR)/dist.mk)
 
 $(info [$(call inc_and_print,subdir_makefiles_inc)/$(subdir_makefiles_total)] writing build rules ...)