diff --git a/Arduino.mk b/Arduino.mk index a352628..42dfef0 100644 --- a/Arduino.mk +++ b/Arduino.mk @@ -279,6 +279,12 @@ else $(call show_config_variable,ARDUINO_DIR,[USER]) endif +ifeq ($(CURRENT_OS),WINDOWS) + ifneq ($(shell echo $(ARDUINO_DIR) | egrep '^(/|[a-zA-Z]:\\)'),) + echo $(error On Windows, ARDUINO_DIR must be a relative path) + endif +endif + ######################################################################## # Default TARGET to pwd (ex Daniele Vergini) 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) \