@@ -299,7 +299,7 @@ ifndef ARDUINO_VERSION
299299 # Remove all the decimals, and right-pad with zeros, and finally grab the first 3 bytes.
300300 # Works for 1.0 and 1.0.1
301301 VERSION_FILE := $(ARDUINO_DIR ) /lib/version.txt
302- AUTO_ARDUINO_VERSION := $(shell [ -e $(VERSION_FILE ) ] && cat $(VERSION_FILE ) | sed -e 's/^[0-9]://g' -e 's/[.]//g' -e 's/$$/0000/' | head -c3)
302+ AUTO_ARDUINO_VERSION := $(shell [ -e " $(VERSION_FILE ) " ] && cat " $(VERSION_FILE ) " | sed -e 's/^[0-9]://g' -e 's/[.]//g' -e 's/$$/0000/' | head -c3)
303303 ifdef AUTO_ARDUINO_VERSION
304304 ARDUINO_VERSION = $(AUTO_ARDUINO_VERSION )
305305 $(call show_config_variable,ARDUINO_VERSION,[AUTODETECTED])
@@ -331,7 +331,7 @@ ifndef ARDUINO_SKETCHBOOK
331331
332332 ifneq ($(ARDUINO_PREFERENCES_PATH),)
333333 ARDUINO_SKETCHBOOK = $(shell grep --max-count=1 --regexp="sketchbook.path=" \
334- $(ARDUINO_PREFERENCES_PATH ) | \
334+ " $(ARDUINO_PREFERENCES_PATH ) " | \
335335 sed -e 's/sketchbook.path=//' )
336336 endif
337337
@@ -520,7 +520,7 @@ endif
520520
521521ifndef PARSE_BOARD
522522 # result = $(call READ_BOARD_TXT, 'boardname', 'parameter')
523- PARSE_BOARD = $(shell grep -v "^\#" $(BOARDS_TXT ) | grep $(1 ) .$(2 ) | cut -d = -f 2 )
523+ PARSE_BOARD = $(shell grep -v "^\#" " $(BOARDS_TXT ) " | grep $(1 ) .$(2 ) | cut -d = -f 2 )
524524endif
525525
526526# If NO_CORE is set, then we don't have to parse boards.txt file
@@ -752,7 +752,6 @@ endif
752752TARGET_HEX = $(OBJDIR ) /$(TARGET ) .hex
753753TARGET_ELF = $(OBJDIR ) /$(TARGET ) .elf
754754TARGET_EEP = $(OBJDIR ) /$(TARGET ) .eep
755- TARGETS = $(OBJDIR ) /$(TARGET ) .*
756755CORE_LIB = $(OBJDIR ) /libcore.a
757756
758757# Names of executables - chipKIT needs to override all to set paths to PIC32
@@ -1255,13 +1254,13 @@ ifneq ($(strip $(AVRDUDE_ISP_FUSES_POST)),)
12551254endif
12561255
12571256clean :
1258- $(REMOVE ) $( LOCAL_OBJS ) $( CORE_OBJS ) $( LIB_OBJS ) $( CORE_LIB ) $( TARGETS ) $( DEPS ) $( USER_LIB_OBJS ) ${ OBJDIR}
1257+ $(REMOVE ) ./ $( OBJDIR )
12591258
12601259size : $(TARGET_HEX )
12611260 $(call avr_size,$(TARGET_ELF ) ,$(TARGET_HEX ) )
12621261
12631262show_boards :
1264- @$(CAT ) $(BOARDS_TXT ) | grep -E " ^[[:alnum:]]+.name" | sort -uf | sed ' s/.name=/:/' | column -s: -t
1263+ @$(CAT ) " $( BOARDS_TXT) " | grep -E " ^[[:alnum:]]+.name" | sort -uf | sed ' s/.name=/:/' | column -s: -t
12651264
12661265monitor :
12671266 $(MONITOR_CMD ) $(call get_monitor_port) $(MONITOR_BAUDRATE )
@@ -1286,7 +1285,7 @@ generated_assembly: generate_assembly
12861285 @$(ECHO ) " \" generated_assembly\" target is deprecated. Use \" generate_assembly\" target instead\n\n"
12871286
12881287help_vars :
1289- @$(CAT ) $(ARDMK_DIR ) /arduino-mk-vars.md
1288+ @$(CAT ) " $( ARDMK_DIR) /arduino-mk-vars.md"
12901289
12911290help :
12921291 @$(ECHO ) " \nAvailable targets:\n\
0 commit comments