diff options
author | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2016-02-26 23:51:21 +0000 |
---|---|---|
committer | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2016-02-26 23:51:21 +0000 |
commit | 593bcf22902e91d877a9e19a581f7a3ef1231c4b (patch) | |
tree | 3e4ec3402a43e8b4eb272b4deb1740bf18ae5ae5 /Makefile | |
parent | 8e4f9aa2b2220333c3073247bd6489b669fa10db (diff) | |
download | flashrom-593bcf22902e91d877a9e19a581f7a3ef1231c4b.zip flashrom-593bcf22902e91d877a9e19a581f7a3ef1231c4b.tar.gz |
makefile: allow to disable all default-yes config variables with CONFIG_NOTHING=yes
All credit for this should be given to Patrick Georgi (see r1869).
Corresponding to flashrom svn r1944.
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -642,6 +642,16 @@ 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 unless CONFIG_EVERYTHING was also set +ifeq ($(CONFIG_NOTHING), yes) + ifeq ($(CONFIG_EVERYTHING), yes) + $(error Setting CONFIG_NOTHING=yes and CONFIG_EVERYTHING=yes does not make sense) + endif + $(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)),\ |