Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a96ef592 authored by Tom Marshall's avatar Tom Marshall Committed by Gerrit Code Review
Browse files

build: Introduce ainfo, aerror functions

envsetup.sh calls make directly to set some build vars.  Any "bare" info or
error messages interfere with the logic, so they must be guarded with
checks for CALLED_FROM_SETUP.  This is tedious and error prone, so provide
an alternative that handles this logic automagically.

Change-Id: I9f9a355a6ae58f2b173cffce796e37be1e68238c
parent 12b0900d
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -3,6 +3,24 @@
# current configuration and platform, which
# are not specific to what is being built.

# These may be used to trace makefile issues without interfering with
# envsetup.sh.  Usage:
#   $(call ainfo,some info message)
#   $(call aerror,some error message)
ifdef CALLED_FROM_SETUP
define ainfo
endef
define aerror
endef
else
define ainfo
$(info $(1))
endef
define aerror
$(error $(1))
endef
endif

# Only use ANDROID_BUILD_SHELL to wrap around bash.
# DO NOT use other shells such as zsh.
ifdef ANDROID_BUILD_SHELL