Skip to content

Commit e1bed90

Browse files
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.
1 parent 05ce9fd commit e1bed90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arduino-mk/Arduino.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ endif
658658
#
659659
ifndef MONITOR_BAUDRATE
660660
#This works only in linux. TODO: Port it to MAC OS also
661-
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}' )
661+
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}' )
662662
MONITOR_BAUDRATE = $(findstring $(SPEED),300 1200 2400 4800 9600 14400 19200 28800 38400 57600 115200)
663663

664664
ifeq ($(MONITOR_BAUDRATE),)

0 commit comments

Comments
 (0)