aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Dahlstrand <sven@dahlstrand.net>2015-09-06 13:14:19 +0200
committerSven Dahlstrand <sven@dahlstrand.net>2015-09-07 11:22:00 +0200
commit8e787ca161df3c631a165d0ba48ac02efb07fcae (patch)
tree2d2d021b1392c1055361b16efa2f10851e6d2e09
parent69f3db0bff9c0a32043d95982aedf4b11655be90 (diff)
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).
-rw-r--r--Arduino.mk4
-rw-r--r--HISTORY.md1
2 files changed, 4 insertions, 1 deletions
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
########################################################################
diff --git a/HISTORY.md b/HISTORY.md
index c97add8..2c98b35 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -17,6 +17,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it
- Tweak: Added some more Continuous Integration tests (https://github.com/sej7278)
- Tweak: Updated Fedora instructions (https://github.com/sej7278)
- Fix: Preserve original extension for object files, support asm sources in core, fixes pulseInASM (Issue #255, #364) (https://github.com/sej7278)
+- Fix: Make sure TARGET is set correctly when CURDIR contains spaces.
### 1.5 (2015-04-07)
- New: Add support for new 1.5.x library layout (Issue #275) (https://github.com/lukasz-e)