aboutsummaryrefslogtreecommitdiff
path: root/chipKIT.mk
diff options
context:
space:
mode:
authorSimon John <git@the-jedi.co.uk>2014-05-19 22:09:00 +0100
committerSudar <sudar@sudarmuthu.com>2014-05-20 12:12:14 +0530
commit9a45b800179efca8177678740ce9020390c0fd0e (patch)
treeb3427e58fdac0d3fb2589499efe1992f1ad95d7f /chipKIT.mk
parent70dfdcc7eb6a4a820533c2c0f58203f4f4ae6da4 (diff)
Check that on windows ARDUINO_DIR (and MPIDE_DIR) is a relative path.
Checks for paths starting with / e.g. /cydrive/arduino or a drive letter e.g. C:\Program Files\Arduino Fix #201 Fix #202
Diffstat (limited to 'chipKIT.mk')
-rw-r--r--chipKIT.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/chipKIT.mk b/chipKIT.mk
index 19a4a4a..06d85e3 100644
--- a/chipKIT.mk
+++ b/chipKIT.mk
@@ -47,6 +47,12 @@ else
$(call show_config_variable,MPIDE_DIR,[USER])
endif
+ifeq ($(CURRENT_OS),WINDOWS)
+ ifneq ($(shell echo $(ARDUINO_DIR) | egrep '^(/|[a-zA-Z]:\\)'),)
+ echo $(error On Windows, MPIDE_DIR must be a relative path)
+ endif
+endif
+
ifndef MPIDE_PREFERENCES_PATH
AUTO_MPIDE_PREFERENCES_PATH := $(firstword \
$(call dir_if_exists,$(HOME)/.mpide/preferences.txt) \