diff --git a/core/config.mk b/core/config.mk index 6bcdda2c43..eaabe64dcb 100644 --- a/core/config.mk +++ b/core/config.mk @@ -22,6 +22,13 @@ BUILD_SYSTEM_COMMON :=$= build/make/common include $(BUILD_SYSTEM_COMMON)/core.mk +# ----------------------------------------------------------------- +# Rules and functions to help copy important files to DIST_DIR +# when requested. This must be included once only, and must be included before +# soong_config (as soong_config calls make_vars-$(TARGET).mk, and soong may +# propagate calls to dist-for-goals there). +include $(BUILD_SYSTEM)/distdir.mk + # Mark variables that should be coming as environment variables from soong_ui # as readonly .KATI_READONLY := OUT_DIR TMPDIR BUILD_DATETIME_FILE diff --git a/core/definitions.mk b/core/definitions.mk index 6a5908a3da..2bf1ba6ccf 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -3086,11 +3086,6 @@ endef ## Other includes ########################################################### -# ----------------------------------------------------------------- -# Rules and functions to help copy important files to DIST_DIR -# when requested. -include $(BUILD_SYSTEM)/distdir.mk - # Include any vendor specific definitions.mk file -include $(TOPDIR)vendor/*/build/core/definitions.mk -include $(TOPDIR)device/*/build/core/definitions.mk