aboutsummaryrefslogtreecommitdiff
path: root/arduino-mk/chipKIT.mk
diff options
context:
space:
mode:
authorSudar <sudar@sudarmuthu.com>2013-07-11 21:10:40 +0530
committerSudar <sudar@sudarmuthu.com>2013-07-12 16:07:49 +0530
commit290a4986d6e8dcbc0fcb03c4135eed911b28765f (patch)
tree268339bf6d453034533b1f48fb05a206ec9e954f /arduino-mk/chipKIT.mk
parent588f7028b2db75d08d2f468f5c5d7c7a4a1e8253 (diff)
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
Diffstat (limited to 'arduino-mk/chipKIT.mk')
-rw-r--r--arduino-mk/chipKIT.mk10
1 files changed, 9 insertions, 1 deletions
diff --git a/arduino-mk/chipKIT.mk b/arduino-mk/chipKIT.mk
index ffcdf1b..874b65e 100644
--- a/arduino-mk/chipKIT.mk
+++ b/arduino-mk/chipKIT.mk
@@ -39,7 +39,15 @@ else
echo $(error "ARDMK_DIR is not defined")
endif
-include $(ARDMK_DIR)/arduino-mk/Common.mk
+ifneq ($(wildcard $(ARDMK_DIR)/arduino-mk/Common.mk),)
+ # git checkout
+ 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
AUTO_MPIDE_DIR := $(firstword \