From 1f445172ff06e30c8c0f82022817dd94417e6ec4 Mon Sep 17 00:00:00 2001 From: Michael LeMay Date: Wed, 6 Jan 2016 20:55:21 -0800 Subject: [PATCH] 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. --- examples/galileo/Makefile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/examples/galileo/Makefile b/examples/galileo/Makefile index 2954adc38..f925f565a 100644 --- a/examples/galileo/Makefile +++ b/examples/galileo/Makefile @@ -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