galileo: Fix build help message in examples

This patch fixes examples/galileo/Makefile so that it actually
displays the intended help message when an unrecognized EXAMPLE is
selected.
This commit is contained in:
Michael LeMay 2016-01-06 20:55:21 -08:00
parent b82d92e373
commit 1f445172ff

View File

@ -2,17 +2,15 @@ TARGET=galileo
KNOWN_EXAMPLES = gpio-input gpio-output gpio-interrupt i2c-LSM9DS0 i2c-callbacks
ifneq ($(filter $(EXAMPLE),$(KNOWN_EXAMPLES)),)
CONTIKI_PROJECT = $(EXAMPLE)
else
CONTIKI_PROJECT = help
ifeq ($(filter $(EXAMPLE),$(KNOWN_EXAMPLES)),)
$(info Set the variable EXAMPLE to one of the following Galileo-specific examples:)
$(foreach EXAMPLE,$(KNOWN_EXAMPLES),$(info - $(EXAMPLE)))
$(error Unable to proceed)
endif
CONTIKI_PROJECT = $(EXAMPLE)
all: $(CONTIKI_PROJECT)
CONTIKI = ../..
include $(CONTIKI)/Makefile.include
help:
@echo -e "\nSet the variable EXAMPLE to one of the following Galileo-specific examples:"
@for EXAMPLE in $(KNOWN_EXAMPLES); do echo $$EXAMPLE; done