From 826b49d0dbaf59a986b7972b88bab1c2c6518fbd Mon Sep 17 00:00:00 2001
From: Pierre DAVID <pdagog@gmail.com>
Date: Mon, 14 Apr 2014 08:39:46 +0200
Subject: [PATCH] Allow spaces in "Serial.begin (....)"

Close #190
---
 Arduino.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Arduino.mk b/Arduino.mk
index ff395d0..2448c03 100644
--- a/Arduino.mk
+++ b/Arduino.mk
@@ -702,7 +702,7 @@ endif
 ifeq ($(strip $(NO_CORE)),)
     ifndef MONITOR_BAUDRATE
         ifeq ($(words $(LOCAL_PDE_SRCS) $(LOCAL_INO_SRCS)), 1)
-            SPEED = $(shell egrep -h 'Serial.begin\([0-9]+\)' $(LOCAL_PDE_SRCS) $(LOCAL_INO_SRCS) | sed -e 's/[^0-9]//g'| head -n1)
+            SPEED = $(shell egrep -h 'Serial.begin *\([0-9]+\)' $(LOCAL_PDE_SRCS) $(LOCAL_INO_SRCS) | sed -e 's/[^0-9]//g'| head -n1)
             MONITOR_BAUDRATE = $(findstring $(SPEED),300 1200 2400 4800 9600 14400 19200 28800 38400 57600 115200)
         endif