diff options
| author | Sudar <sudar@sudarmuthu.com> | 2013-07-09 19:51:11 -0700 |
|---|---|---|
| committer | Sudar <sudar@sudarmuthu.com> | 2013-07-09 19:51:11 -0700 |
| commit | 4165bad7d6625bb9fcb5fd43fed5d64b86fb14d5 (patch) | |
| tree | c3642e8f4eff7ac53970dc5398afef3a1f4b6452 /arduino-mk | |
| parent | ba27470547bc80242c50c3fec37124b256b1c032 (diff) | |
| parent | 3c00739165ddfdcf2db4271794d3e9a04d316589 (diff) | |
Merge pull request #108 from openxc/no-preferences-required
Don't require an IDE preferences file, fallback to default sketchbook.
Diffstat (limited to 'arduino-mk')
| -rw-r--r-- | arduino-mk/Arduino.mk | 37 | ||||
| -rw-r--r-- | arduino-mk/chipKIT.mk | 2 |
2 files changed, 17 insertions, 22 deletions
diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index 7c45bc5..6954b06 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -285,30 +285,27 @@ endif # Arduino Sketchbook folder # -ifndef ARDUINO_PREFERENCES_PATH - - AUTO_ARDUINO_PREFERENCES := $(firstword \ - $(call dir_if_exists,$(HOME)/.arduino/preferences.txt) \ - $(call dir_if_exists,$(HOME)/Library/Arduino/preferences.txt) ) - ifdef AUTO_ARDUINO_PREFERENCES - ARDUINO_PREFERENCES_PATH = $(AUTO_ARDUINO_PREFERENCES) - $(call show_config_variable,ARDUINO_PREFERENCES_PATH,[AUTODETECTED]) - else - echo $(error "ARDUINO_PREFERENCES is not defined") - endif - -else - $(call show_config_variable,ARDUINO_PREFERENCES_PATH,[USER]) -endif ifndef ARDUINO_SKETCHBOOK - ifeq ($(ARDUINO_PREFERENCES_PATH),) - echo $(error No ARDUINO_PREFERENCES_PATH detected, cannot autodetect ARDUINO_SKETCHBOOK) + ifndef ARDUINO_PREFERENCES_PATH + + AUTO_ARDUINO_PREFERENCES := $(firstword \ + $(call dir_if_exists,$(HOME)/.arduino/preferences.txt) \ + $(call dir_if_exists,$(HOME)/Library/Arduino/preferences.txt) ) + ifdef AUTO_ARDUINO_PREFERENCES + ARDUINO_PREFERENCES_PATH = $(AUTO_ARDUINO_PREFERENCES) + $(call show_config_variable,ARDUINO_PREFERENCES_PATH,[AUTODETECTED]) + endif + + else + $(call show_config_variable,ARDUINO_PREFERENCES_PATH,[USER]) endif - ARDUINO_SKETCHBOOK = $(shell grep --max-count=1 --regexp="sketchbook.path=" \ - $(ARDUINO_PREFERENCES_PATH) | \ - sed -e 's/sketchbook.path=//' ) + ifneq ($(ARDUINO_PREFERENCES_PATH),) + ARDUINO_SKETCHBOOK = $(shell grep --max-count=1 --regexp="sketchbook.path=" \ + $(ARDUINO_PREFERENCES_PATH) | \ + sed -e 's/sketchbook.path=//' ) + endif ifneq ($(ARDUINO_SKETCHBOOK),) $(call show_config_variable,ARDUINO_SKETCHBOOK,[AUTODETECTED],(from arduino preferences file)) diff --git a/arduino-mk/chipKIT.mk b/arduino-mk/chipKIT.mk index f519f70..1618bf5 100644 --- a/arduino-mk/chipKIT.mk +++ b/arduino-mk/chipKIT.mk @@ -62,8 +62,6 @@ ifndef MPIDE_PREFERENCES_PATH ifdef AUTO_MPIDE_PREFERENCES_PATH MPIDE_PREFERENCES_PATH = $(AUTO_MPIDE_PREFERENCES_PATH) $(call show_config_variable,MPIDE_PREFERENCES_PATH,[autodetected]) - else - echo $(error "MPIDE_PREFERENCES_PATH is not defined") endif endif |
