Browse Source

Error out from make install if ARDUINO env var is unset

tags/lab04-alt
Arti Zirk 2 years ago
parent
commit
39a457b101
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      Makefile

+ 7
- 0
Makefile View File

@@ -90,6 +90,13 @@ clean:
90 90
 	rm -fr $(BUILD_LIBS_DIR)/*/*.o
91 91
 
92 92
 install:
93
+	@if [ ! -c "$(ARDUINO)" ]; then \
94
+		echo -e "\n\nEnvironment variable ARDUINO is \"$(ARDUINO)\" and that is invalid."\
95
+				"\nDid you do \"export ARDUINO=/dev/ttyACM0\" before running make install?"\
96
+				"\nAlso make sure that ARDUINO env var points to a valid tty device\n\n"; \
97
+		exit 1;\
98
+	fi
99
+	
93 100
 	$(AVRDUDE) $(AVRDUDEARGS) -U flash:w:$(TARGET)
94 101
 
95 102
 format:

Loading…
Cancel
Save