Don't require an IDE preferences file, fallback to default sketchbook.
It should be possible to use the Makefile without ever running the Arduino or chipKIT IDE. This change only looks for the preferences file if the sketchbook path is not defined, and even then, will use the default skethbook path if the preferences file is unavailable.
This commit is contained in:
parent
474da2ced4
commit
3c00739165
2 changed files with 17 additions and 22 deletions
|
@ -285,6 +285,8 @@ endif
|
||||||
# Arduino Sketchbook folder
|
# Arduino Sketchbook folder
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
ifndef ARDUINO_SKETCHBOOK
|
||||||
ifndef ARDUINO_PREFERENCES_PATH
|
ifndef ARDUINO_PREFERENCES_PATH
|
||||||
|
|
||||||
AUTO_ARDUINO_PREFERENCES := $(firstword \
|
AUTO_ARDUINO_PREFERENCES := $(firstword \
|
||||||
|
@ -293,22 +295,17 @@ ifndef ARDUINO_PREFERENCES_PATH
|
||||||
ifdef AUTO_ARDUINO_PREFERENCES
|
ifdef AUTO_ARDUINO_PREFERENCES
|
||||||
ARDUINO_PREFERENCES_PATH = $(AUTO_ARDUINO_PREFERENCES)
|
ARDUINO_PREFERENCES_PATH = $(AUTO_ARDUINO_PREFERENCES)
|
||||||
$(call show_config_variable,ARDUINO_PREFERENCES_PATH,[AUTODETECTED])
|
$(call show_config_variable,ARDUINO_PREFERENCES_PATH,[AUTODETECTED])
|
||||||
else
|
|
||||||
echo $(error "ARDUINO_PREFERENCES is not defined")
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
else
|
else
|
||||||
$(call show_config_variable,ARDUINO_PREFERENCES_PATH,[USER])
|
$(call show_config_variable,ARDUINO_PREFERENCES_PATH,[USER])
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef ARDUINO_SKETCHBOOK
|
ifneq ($(ARDUINO_PREFERENCES_PATH),)
|
||||||
ifeq ($(ARDUINO_PREFERENCES_PATH),)
|
|
||||||
echo $(error No ARDUINO_PREFERENCES_PATH detected, cannot autodetect ARDUINO_SKETCHBOOK)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ARDUINO_SKETCHBOOK = $(shell grep --max-count=1 --regexp="sketchbook.path=" \
|
ARDUINO_SKETCHBOOK = $(shell grep --max-count=1 --regexp="sketchbook.path=" \
|
||||||
$(ARDUINO_PREFERENCES_PATH) | \
|
$(ARDUINO_PREFERENCES_PATH) | \
|
||||||
sed -e 's/sketchbook.path=//' )
|
sed -e 's/sketchbook.path=//' )
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(ARDUINO_SKETCHBOOK),)
|
ifneq ($(ARDUINO_SKETCHBOOK),)
|
||||||
$(call show_config_variable,ARDUINO_SKETCHBOOK,[AUTODETECTED],(from arduino preferences file))
|
$(call show_config_variable,ARDUINO_SKETCHBOOK,[AUTODETECTED],(from arduino preferences file))
|
||||||
|
|
|
@ -62,8 +62,6 @@ ifndef MPIDE_PREFERENCES_PATH
|
||||||
ifdef AUTO_MPIDE_PREFERENCES_PATH
|
ifdef AUTO_MPIDE_PREFERENCES_PATH
|
||||||
MPIDE_PREFERENCES_PATH = $(AUTO_MPIDE_PREFERENCES_PATH)
|
MPIDE_PREFERENCES_PATH = $(AUTO_MPIDE_PREFERENCES_PATH)
|
||||||
$(call show_config_variable,MPIDE_PREFERENCES_PATH,[autodetected])
|
$(call show_config_variable,MPIDE_PREFERENCES_PATH,[autodetected])
|
||||||
else
|
|
||||||
echo $(error "MPIDE_PREFERENCES_PATH is not defined")
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue