From c1460add3bc754525a58a913769a7a08d5993841 Mon Sep 17 00:00:00 2001 From: Mike Smith Date: Sun, 11 Sep 2011 22:20:54 -0700 Subject: [PATCH] Reinstate a Cygwin workround that was backed out by the previous changes. Not all platforms support (or require) the -r argument to sed. --- config.mk | 2 ++ libraries/AP_Common/Arduino.mk | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 config.mk diff --git a/config.mk b/config.mk new file mode 100644 index 0000000000..8375e45334 --- /dev/null +++ b/config.mk @@ -0,0 +1,2 @@ +BOARD=mega +PORT=/dev/null diff --git a/libraries/AP_Common/Arduino.mk b/libraries/AP_Common/Arduino.mk index ae3f3e572e..287684a060 100644 --- a/libraries/AP_Common/Arduino.mk +++ b/libraries/AP_Common/Arduino.mk @@ -259,7 +259,12 @@ SKETCHCPP_SRC := $(SKETCHPDE) $(sort $(filter-out $(SKETCHPDE),$(SKETCHPDESRCS) # make. # SEXPR = 's/^[[:space:]]*\#include[[:space:]][<\"]([^>\"./]+).*$$/\1/p' -LIBTOKENS := $(sort $(shell cat $(SKETCHPDESRCS) $(SKETCHSRCS) | sed -nre $(SEXPR))) +ifneq ($(findstring CYGWIN, $(SYSTYPE)),) + # Workaround a cygwin issue + LIBTOKENS := $(sort $(shell cat $(SKETCHPDESRCS) $(SKETCHSRCS) | sed -nre $(SEXPR))) +else + LIBTOKENS := $(sort $(shell cat $(SKETCHPDESRCS) $(SKETCHSRCS) | sed -nEe $(SEXPR))) +endif # # Find sketchbook libraries referenced by the sketch.