aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Vincent <jesse@keyboard.io>2017-12-15 21:07:30 -0800
committerJesse Vincent <jesse@keyboard.io>2017-12-15 21:07:30 -0800
commit709aaa235487e8ce086c5ddf159d34d8c3dd618b (patch)
treeb4deaa19f9535254eb1d942e4bf3dfdef4340884
parentcd2f939adc5ec69c6fd5af5b44859df3395a2d08 (diff)
downloadModel01-Firmware-709aaa235487e8ce086c5ddf159d34d8c3dd618b.tar.gz
Model01-Firmware-709aaa235487e8ce086c5ddf159d34d8c3dd618b.zip
Add a big warning when you build by hand and have multiple copies of
kaleidoscope installed
-rw-r--r--Makefile36
1 files changed, 32 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 585ccba..ac11fb3 100644
--- a/Makefile
+++ b/Makefile
@@ -12,12 +12,40 @@ PACKAGE_DIR ?= $(HOME)/.arduino15
endif
-INSTALLED_ENV=$(shell ls -dt $(PACKAGE_DIR)/packages/keyboardio/hardware/avr/* 2>/dev/null |head -n 1)
+ARDUINO_INSTALLED_ENV=$(shell ls -dt $(PACKAGE_DIR)/packages/keyboardio/hardware/avr/* 2>/dev/null |head -n 1)
+MANUALLY_INSTALLED_ENV=$(shell ls -dt $(SKETCHBOOK_DIR)/hardware/keyboardio/avr 2>/dev/null |head -n 1)
+
+
+
+ifneq ("$(wildcard $(ARDUINO_INSTALLED_ENV)/boards.txt)","")
+
+ifneq ("$(wildcard $(MANUALLY_INSTALLED_ENV)/boards.txt)","")
+
+$(info ***************************************************************************)
+$(info It appears that you have installed two copies of Kaleidoscope. One copy was)
+$(info installed using Arduino's "Board Manager", while the other was installed by)
+$(info hand, probably using "git".)
+$(info )
+$(info This will likely cause some trouble as you try to build keyboard firmware)
+$(info using Kaleidoscope. You may want to remove either: )
+$(info )
+$(info $(PACKAGE_DIR)/packages/keyboardio/ which was installed using Arduino)
+$(info )
+$(info or)
+$(info )
+$(info $(SKETCHBOOK_DIR)/hardware/keyboardio/ which was installed by hand.)
+$(info )
+$(info ***************************************************************************)
+$(info )
+
+endif
-ifneq ("$(wildcard $(INSTALLED_ENV)/boards.txt)","")
-BOARD_HARDWARE_PATH = $(INSTALLED_ENV)
+BOARD_HARDWARE_PATH = $(ARDUINO_INSTALLED_ENV)
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= build-tools/makefiles/
-KALEIDOSCOPE_BUILDER_DIR ?= $(INSTALLED_ENV)/libraries/Kaleidoscope/bin/
+KALEIDOSCOPE_BUILDER_DIR ?= $(ARDUINO_INSTALLED_ENV)/libraries/Kaleidoscope/bin/
+
+
+
endif