From f773f3a024f20133955d69b6bf28dec8a26da56d Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Thu, 28 Apr 2022 16:12:52 -0700 Subject: [PATCH] Add deprecation warning for base-rules-hook This lets product/board config define a function that is called while processing modules defined in an Android.mk file. When the product/board configs are converted to starlark, they won't be able to supply a base-rules-hook anymore. Emit a warning saying that it's deprecated. Bug: 226974242 Test: Manually Change-Id: Ie6baa4952516a3ec5c6c440f9106f7b5185803b7 --- core/base_rules.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/base_rules.mk b/core/base_rules.mk index 7ea9b528da..355a22e945 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -20,7 +20,11 @@ $(call record-module-type,base_rules) # Users can define base-rules-hook in their buildspec.mk to perform # arbitrary operations as each module is included. ifdef base-rules-hook -$(if $(base-rules-hook),) + ifndef _has_warned_about_base_rules_hook + $(warning base-rules-hook is deprecated, please remove usages of it and/or convert to Soong.) + _has_warned_about_base_rules_hook := true + endif + $(if $(base-rules-hook),) endif ###########################################################