From 8e787ca161df3c631a165d0ba48ac02efb07fcae Mon Sep 17 00:00:00 2001 From: Sven Dahlstrand Date: Sun, 6 Sep 2015 13:14:19 +0200 Subject: Make sure TARGET is set correctly when CURDIR contains spaces. With this fix the `TARGET` variable is set correctly when the project directory (or its path) contains spaces. So in this case: /Users/Joe/Dropbox (Personal)/example project `TARGET` will be set to `example_project` instead of `Dropbox example project` (like it was before this fix). --- Arduino.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Arduino.mk') diff --git a/Arduino.mk b/Arduino.mk index ba16697..43e1bb8 100644 --- a/Arduino.mk +++ b/Arduino.mk @@ -266,7 +266,9 @@ endif # Default TARGET to pwd (ex Daniele Vergini) ifndef TARGET - TARGET = $(notdir $(CURDIR)) + space := + space += + TARGET = $(notdir $(subst $(space),_,$(CURDIR))) endif ######################################################################## -- cgit v1.2.3