[2/8] Makefile: Trigger a Warning if BROKEN defined

Message ID 20190428204801.9578-3-jagan@amarulasolutions.com
State New
Headers show
Series
  • [1/8] Kconfig: Update CONFIG_BROKEN help text
Related show

Commit Message

Jagan Teki April 28, 2019, 8:47 p.m. UTC
If configured target has broken config enabled, trigger a warning
saying that the desired .config has broken configuration.

Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 Makefile | 3 +++
 1 file changed, 3 insertions(+)

Comments

Heinrich Schuchardt April 29, 2019, 6 a.m. UTC | #1
On 4/28/19 10:47 PM, Jagan Teki wrote:
> If configured target has broken config enabled, trigger a warning
> saying that the desired .config has broken configuration.
>
> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
>   Makefile | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index 66a09ac900..02c9a73d33 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -918,6 +918,9 @@ cmd_cfgcheck = $(srctree)/scripts/check-config.sh $2 \
>   		$(srctree)/scripts/config_whitelist.txt $(srctree)
>
>   all:		$(ALL-y)
> +ifeq ($(CONFIG_BROKEN),y)
> +	$(warning "You have broken configuration in your .config! Please check your configuration.")

 > +	$(warning "Your .config file selects a feature marked as broken.
Please check your configuration.")

Regards

Heinrich

> +endif # broken
>   ifeq ($(CONFIG_DM_I2C_COMPAT)$(CONFIG_SANDBOX),y)
>   	@echo >&2 "===================== WARNING ======================"
>   	@echo >&2 "This board uses CONFIG_DM_I2C_COMPAT. Please remove"
>

Patch

diff --git a/Makefile b/Makefile
index 66a09ac900..02c9a73d33 100644
--- a/Makefile
+++ b/Makefile
@@ -918,6 +918,9 @@  cmd_cfgcheck = $(srctree)/scripts/check-config.sh $2 \
 		$(srctree)/scripts/config_whitelist.txt $(srctree)
 
 all:		$(ALL-y)
+ifeq ($(CONFIG_BROKEN),y)
+	$(warning "You have broken configuration in your .config! Please check your configuration.")
+endif # broken
 ifeq ($(CONFIG_DM_I2C_COMPAT)$(CONFIG_SANDBOX),y)
 	@echo >&2 "===================== WARNING ======================"
 	@echo >&2 "This board uses CONFIG_DM_I2C_COMPAT. Please remove"