From 39a457b1013367386ee78bc62abce7d60dbda7b3 Mon Sep 17 00:00:00 2001 From: Arti Zirk Date: Sun, 6 Nov 2016 20:37:15 +0200 Subject: [PATCH] Error out from make install if ARDUINO env var is unset --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index fb399fb..615c0c4 100644 --- a/Makefile +++ b/Makefile @@ -90,6 +90,13 @@ clean: rm -fr $(BUILD_LIBS_DIR)/*/*.o install: + @if [ ! -c "$(ARDUINO)" ]; then \ + echo -e "\n\nEnvironment variable ARDUINO is \"$(ARDUINO)\" and that is invalid."\ + "\nDid you do \"export ARDUINO=/dev/ttyACM0\" before running make install?"\ + "\nAlso make sure that ARDUINO env var points to a valid tty device\n\n"; \ + exit 1;\ + fi + $(AVRDUDE) $(AVRDUDEARGS) -U flash:w:$(TARGET) format: