From 19334b8cf5be128ef0aa334d26b90efb8f2efc81 Mon Sep 17 00:00:00 2001 From: Julien Ridoux Date: Mon, 17 Mar 2014 10:02:09 +1100 Subject: [PATCH] Make runscript_if_exists() more Windows friendly --- Arduino.mk | 2 +- Common.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Arduino.mk b/Arduino.mk index 9fb529c..1406cbe 100644 --- a/Arduino.mk +++ b/Arduino.mk @@ -1110,7 +1110,7 @@ $(OBJDIR): pre-build $(MKDIR) $(OBJDIR) pre-build: - $(call runscript_if_exists,$(PRE_BUILD_HOOK)) + $(call runscript_if_exists,$(CURDIR)/$(PRE_BUILD_HOOK)) $(TARGET_ELF): $(LOCAL_OBJS) $(CORE_LIB) $(OTHER_OBJS) $(CC) $(LDFLAGS) -o $@ $(LOCAL_OBJS) $(CORE_LIB) $(OTHER_OBJS) -lc -lm diff --git a/Common.mk b/Common.mk index c216fd8..8131dba 100644 --- a/Common.mk +++ b/Common.mk @@ -5,7 +5,7 @@ dir_if_exists = $(if $(wildcard $(1)$(2)),$(1)) # Run a shell script if it exists. -runscript_if_exists = $(if $(wildcard $(1)), $(shell sh $(1))) +runscript_if_exists = $(if $(wildcard $(1)), $(shell $(1))) # For message printing: pad the right side of the first argument with spaces to # the number of bytes indicated by the second argument.