Check that color is valid
Instead of merely checking that COLOR is set, check that it is one of RED, BLUE or GREEN
This commit is contained in:
parent
439843f56b
commit
96fdf64c4c
6
make.mk
6
make.mk
@ -213,6 +213,12 @@ ifndef COLOR
|
|||||||
$(error Set the COLOR variable to RED, BLUE, or GREEN depending on what board you have.)
|
$(error Set the COLOR variable to RED, BLUE, or GREEN depending on what board you have.)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
COLOR_VALID := $(filter $(COLOR),RED BLUE GREEN)
|
||||||
|
|
||||||
|
ifeq ($(COLOR_VALID),)
|
||||||
|
$(error COLOR must be RED, BLUE, or GREEN)
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(COLOR), BLUE)
|
ifeq ($(COLOR), BLUE)
|
||||||
CFLAGS += -DWATCH_IS_BLUE_BOARD
|
CFLAGS += -DWATCH_IS_BLUE_BOARD
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user