From 8da52d4b9d982f98586135f419f9f7f30140b8fd Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Thu, 8 Aug 2019 10:58:09 -0700 Subject: [PATCH] Move TOP/TOPDIR to build/make/common/core.mk So that they're set properly during dumpvars / product loading. SHELL is already set in common/core.mk, so it's not necessary to be in core/main.mk as well (which quickly loads core/config.mk, which loads common/core.mk). Test: get_build_var TOP Test: get_build_var TOPDIR Change-Id: I8179ac32628b74ccf29851dc53bf83cfb4b280fd --- common/core.mk | 3 +++ core/main.mk | 14 -------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/common/core.mk b/common/core.mk index e5264b072d..7d505c01d9 100644 --- a/common/core.mk +++ b/common/core.mk @@ -42,6 +42,9 @@ endef backslash := \a backslash := $(patsubst %a,%,$(backslash)) +TOP :=$= . +TOPDIR :=$= + # Prevent accidentally changing these variables .KATI_READONLY := SHELL empty space comma newline pound backslash diff --git a/core/main.mk b/core/main.mk index a240b35cee..5e25af4ee3 100644 --- a/core/main.mk +++ b/core/main.mk @@ -1,14 +1,3 @@ -# Only use ANDROID_BUILD_SHELL to wrap around bash. -# DO NOT use other shells such as zsh. -ifdef ANDROID_BUILD_SHELL -SHELL := $(ANDROID_BUILD_SHELL) -else -# Use bash, not whatever shell somebody has installed as /bin/sh -# This is repeated in config.mk, since envsetup.sh runs that file -# directly. -SHELL := /bin/bash -endif - ifndef KATI $(warning Calling make directly is no longer supported.) $(warning Either use 'envsetup.sh; m' or 'build/soong/soong_ui.bash --make-mode') @@ -22,9 +11,6 @@ $(info [1/1] initializing build system ...) # the top of the source tree, for example when "make -C" is used in m/mm/mmm. PWD := $(shell pwd) -TOP := . -TOPDIR := - # This is the default target. It must be the first declared target. .PHONY: droid DEFAULT_GOAL := droid