From 39ef5632940fdb305c31139f7bcb3b9550904dba Mon Sep 17 00:00:00 2001 From: Mitch Phillips Date: Thu, 26 Sep 2019 14:57:33 -0700 Subject: [PATCH] Move definition of dist-for-goals before call. New changes to Soong allow for dist-for-goals to be directly invoked through the Soong-side of the build system. This presents a problem, as the dist-for-goals propagation for Soong lands in make_vars-$(target).mk, which is called before dist-for-goals is defined. We move the dist-for-goals definition (through moving where distdir.mk is included) to be before any possible use of the call to dist-for-goals. Test: m checkbuild Change-Id: Icef27a4d2239948b07354c87b58c9985a66a53bd --- core/config.mk | 7 +++++++ core/definitions.mk | 5 ----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/core/config.mk b/core/config.mk index d120d61651..e887d939bf 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 7450d4fc0c..1b278178bd 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -3139,11 +3139,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