aboutsummaryrefslogtreecommitdiff
path: root/Common.mk
diff options
context:
space:
mode:
authorJohn Whittington <git@jbrengineering.co.uk>2020-08-06 19:21:23 +0200
committerJohn Whittington <git@jbrengineering.co.uk>2020-08-06 20:01:05 +0200
commitbf319c49b7f7ff17e073422a3ba06a701e12f590 (patch)
tree66d05b1e87a9efcd27af2f485dc3cfae528b553d /Common.mk
parent185a1e9e3527794a49451915009fb48d9e678080 (diff)
platform neutral examples and manual cherry-pick merge of https://github.com/alissa-huskey/Arduino-Makefile/tree/test_fixes
Diffstat (limited to 'Common.mk')
-rw-r--r--Common.mk18
1 files changed, 11 insertions, 7 deletions
diff --git a/Common.mk b/Common.mk
index d111336..501f582 100644
--- a/Common.mk
+++ b/Common.mk
@@ -48,20 +48,20 @@ $(call arduino_output,$(call ardmk_include) Configuration:)
ifeq ($(OS),Windows_NT)
CURRENT_OS = WINDOWS
- GREP_CMD := grep
+ GREP_CMD = grep
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
CURRENT_OS = LINUX
- GREP_CMD := grep
+ GREP_CMD = grep
endif
ifeq ($(UNAME_S),Darwin)
CURRENT_OS = MAC
ifeq (, $(shell which ggrep))
echo $(info Using macOS BSD grep, please install GNU grep to avoid warnings)
- GREP_CMD := grep
+ GREP_CMD = grep
else
- GREP_CMD := ggrep
+ GREP_CMD = ggrep
endif
endif
endif
@@ -73,14 +73,18 @@ $(call show_config_variable,CURRENT_OS,[AUTODETECTED])
ifneq ($(TEST),)
DEPENDENCIES_DIR = /var/tmp/Arduino-Makefile-testing-dependencies
- DEPENDENCIES_MPIDE_DIR = $(DEPENDENCIES_DIR)/mpide-0023-linux64-20130817-test
+ DEPENDENCIES_MPIDE_DIR := $(shell find $(DEPENDENCIES_DIR) -name 'mpide-0023-*' -type d -exec ls -dt {} + | head -n 1)
+
ifeq ($(MPIDE_DIR),)
MPIDE_DIR = $(DEPENDENCIES_MPIDE_DIR)
endif
ifndef ARDUINO_IDE_DIR
- ARDUINO_IDE_DIR := $(shell basename $(basename $(basename $(lastword $(wildcard $(DEPENDENCIES_DIR)/arduino*)))))
- # ARDUINO_IDE_DIR := arduino
+ ifeq ($(CURRENT_OS),MAC)
+ ARDUINO_IDE_DIR = Arduino.app/Contents/Resources/Java
+ else
+ ARDUINO_IDE_DIR := $(shell basename $(basename $(basename $(lastword $(wildcard $(DEPENDENCIES_DIR)/arduino*)))))
+ endif
endif
DEPENDENCIES_ARDUINO_DIR = $(DEPENDENCIES_DIR)/$(ARDUINO_IDE_DIR)
ifeq ($(ARDUINO_DIR),)