[flashrom] [PATCH] makefile: allow to disable all default-yes config variables with CONFIG_NOTHING=yes.

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Fri Feb 26 22:11:55 CET 2016


On 21.02.2016 15:47, Stefan Tauner wrote:
> All credit for this should be given to Patrick Georgi (see r1869).
>
> Signed-off-by: Stefan Tauner <stefan.tauner at alumni.tuwien.ac.at>
> ---
>  Makefile | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index 095a49c..976d7ba 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -541,6 +541,13 @@ CONFIG_CH341A_SPI ?= yes
>  # Disable wiki printing by default. It is only useful if you have wiki access.
>  CONFIG_PRINT_WIKI ?= no
>  
> +# Disable all features if CONFIG_NOTHING=yes is given
> +ifeq ($(CONFIG_NOTHING), yes)

As per the IRC discussion I'd like to insert an error here if
CONFIG_EVERYTHING=yes is set as well.

> +$(foreach var, $(filter CONFIG_%, $(.VARIABLES)),\
> +	$(if $(filter yes, $($(var))),\
> +		$(eval $(var)=no)))
> +endif
> +
>  # Enable all features if CONFIG_EVERYTHING=yes is given
>  ifeq ($(CONFIG_EVERYTHING), yes)
>  $(foreach var, $(filter CONFIG_%, $(.VARIABLES)),\

Looks good otherwise.

Regards,
Carl-Daniel




More information about the flashrom mailing list