Make ARDMK_PATH
and ARDMK_DIR
backward compatible
When support for ChipKit was added recently (issue #98) it broke the way ARDMK_PATH and ARDMK_DIR were handled, if the package was installed through package. It was only working if you have done a git checkout. This commit fixes it, but searching for `Common.mk` both in `ARDMK_DIR/arduino-mk` and `ARDMK_DIR/` directories. Fix #110
This commit is contained in:
parent
588f7028b2
commit
290a4986d6
3 changed files with 21 additions and 5 deletions
|
@ -18,7 +18,7 @@ On the Mac you might want to set:
|
||||||
On Linux, you might prefer:
|
On Linux, you might prefer:
|
||||||
|
|
||||||
ARDUINO_DIR = /usr/share/arduino
|
ARDUINO_DIR = /usr/share/arduino
|
||||||
ARDMK_DIR = /usr/local
|
ARDMK_DIR = /usr
|
||||||
AVR_TOOLS_DIR = /usr
|
AVR_TOOLS_DIR = /usr
|
||||||
|
|
||||||
The Makefile also delegates resetting the board to a short Perl program.
|
The Makefile also delegates resetting the board to a short Perl program.
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
# On Linux, you might prefer:
|
# On Linux, you might prefer:
|
||||||
#
|
#
|
||||||
# ARDUINO_DIR = /usr/share/arduino
|
# ARDUINO_DIR = /usr/share/arduino
|
||||||
# ARDMK_DIR = /usr/local
|
# ARDMK_DIR = /usr
|
||||||
# AVR_TOOLS_DIR = /usr
|
# AVR_TOOLS_DIR = /usr
|
||||||
#
|
#
|
||||||
# You can either set these up in the Makefile, or put them in your
|
# You can either set these up in the Makefile, or put them in your
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
# BOARD_TAG = uno
|
# BOARD_TAG = uno
|
||||||
# MONITOR_PORT = /dev/cu.usb*
|
# MONITOR_PORT = /dev/cu.usb*
|
||||||
#
|
#
|
||||||
# include /usr/local/share/Arduino.mk
|
# include /usr/share/arduino/Arduino.mk
|
||||||
#
|
#
|
||||||
# Hopefully these will be self-explanatory but in case they're not:
|
# Hopefully these will be self-explanatory but in case they're not:
|
||||||
#
|
#
|
||||||
|
@ -236,7 +236,15 @@ else
|
||||||
echo $(error "ARDMK_DIR is not defined")
|
echo $(error "ARDMK_DIR is not defined")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(wildcard $(ARDMK_DIR)/arduino-mk/Common.mk),)
|
||||||
|
# git checkout
|
||||||
include $(ARDMK_DIR)/arduino-mk/Common.mk
|
include $(ARDMK_DIR)/arduino-mk/Common.mk
|
||||||
|
else
|
||||||
|
ifneq ($(wildcard $(ARDMK_DIR)/Common.mk),)
|
||||||
|
# package install
|
||||||
|
include $(ARDMK_DIR)/Common.mk
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
#
|
#
|
||||||
|
|
|
@ -39,7 +39,15 @@ else
|
||||||
echo $(error "ARDMK_DIR is not defined")
|
echo $(error "ARDMK_DIR is not defined")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(wildcard $(ARDMK_DIR)/arduino-mk/Common.mk),)
|
||||||
|
# git checkout
|
||||||
include $(ARDMK_DIR)/arduino-mk/Common.mk
|
include $(ARDMK_DIR)/arduino-mk/Common.mk
|
||||||
|
else
|
||||||
|
ifneq ($(wildcard $(ARDMK_DIR)/Common.mk),)
|
||||||
|
# package install
|
||||||
|
include $(ARDMK_DIR)/Common.mk
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifndef MPIDE_DIR
|
ifndef MPIDE_DIR
|
||||||
AUTO_MPIDE_DIR := $(firstword \
|
AUTO_MPIDE_DIR := $(firstword \
|
||||||
|
|
Loading…
Reference in a new issue