diff options
| author | gabriel <gabriel@gaftech.fr> | 2013-01-24 12:10:27 +0100 |
|---|---|---|
| committer | gabriel <gabriel@gaftech.fr> | 2013-01-24 12:10:27 +0100 |
| commit | ccd17539e2ce64db06b0bee200950635433dbe8e (patch) | |
| tree | 81d3d9ea73d9def64e852648c1edfbde8959c637 /arduino-mk/Arduino.mk | |
| parent | 142098be085c235457236c68b8a78e9391d8eb76 (diff) | |
| parent | cd36eb6abb43fe2a9286f4762dd9cdf4d3ad9b28 (diff) | |
Merge branch 'master' of https://github.com/sudar/Arduino-Makefile
Diffstat (limited to 'arduino-mk/Arduino.mk')
| -rw-r--r-- | arduino-mk/Arduino.mk | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index b915445..96f2e1b 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -478,6 +478,14 @@ ifndef ARDUINO_SKETCHBOOK $(HOME)/.arduino/preferences.txt | \ sed -e 's/sketchbook.path=//' ) endif + + # on mac + ifneq ($(wildcard $(HOME)/Library/Arduino/preferences.txt),) + ARDUINO_SKETCHBOOK = $(shell grep --max-count=1 --regexp="sketchbook.path=" \ + $(HOME)/Library/Arduino/preferences.txt | \ + sed -e 's/sketchbook.path=//' ) + endif + ifneq ($(ARDUINO_SKETCHBOOK),) $(call show_config_variable,ARDUINO_SKETCHBOOK,[AUTODETECTED],(in arduino preferences file)) else @@ -503,8 +511,8 @@ endif # for more information (search for 'character special device'). # ifndef MONITOR_BAUDRATE - #This works only in linux. TODO: Port it to MAC OS also - SPEED = $(shell grep --max-count=1 --regexp="Serial.begin" $$(ls -1 *.ino) | sed -e 's/\/\/.*$$//g' -e 's/(/\t/' -e 's/)/\t/' | awk -F '\t' '{print $$2}' ) + #This works only in linux. TODO: Port it to MAC OS also + SPEED = $(shell grep --max-count=1 --regexp="Serial.begin" $$(ls -1 *.ino) | sed -e 's/\t//g' -e 's/\/\/.*$$//g' -e 's/(/\t/' -e 's/)/\t/' | awk -F '\t' '{print $$2}' ) MONITOR_BAUDRATE = $(findstring $(SPEED),300 1200 2400 4800 9600 14400 19200 28800 38400 57600 115200) ifeq ($(MONITOR_BAUDRATE),) |
