From e1bed904043a79611768a8f98e32d7b79bafb3b3 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Thu, 30 May 2013 13:09:15 +0200 Subject: [PATCH] Let MONITOR_BAUDRATE detection also look in .pde files Before, it would only look in .ino files. If you had no .ino file but only a .pde file, this would cause the build to hang, since grep would be waiting for input on its stdin. --- arduino-mk/Arduino.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index 88efb0d..aed16d6 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -658,7 +658,7 @@ endif # ifndef MONITOR_BAUDRATE #This works only in linux. TODO: Port it to MAC OS also - SPEED = $(shell grep --max-count=1 --regexp="Serial.begin" $(LOCAL_INO_SRCS) | sed -e 's/\t//g' -e 's/\/\/.*$$//g' -e 's/(/\t/' -e 's/)/\t/' | awk -F '\t' '{print $$2}' ) + SPEED = $(shell grep --max-count=1 --regexp="Serial.begin" $(LOCAL_PDE_SRCS) $(LOCAL_INO_SRCS) | 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),)