aboutsummaryrefslogtreecommitdiff
path: root/Arduino.mk
diff options
context:
space:
mode:
authorJohn Whittington <john@jbrengineering.co.uk>2017-09-03 13:19:36 +0100
committerJohn Whittington <john@jbrengineering.co.uk>2017-09-03 13:19:36 +0100
commit04f0ee07280c823447afc4bb14b2ec6cf1b8e470 (patch)
treeb9007d9ebb8fde5de321ee847b9fde5d55d0af68 /Arduino.mk
parent85db740a1c00ebfa61418e6182c85c723f6a8f8c (diff)
rm old tags file made safer and only if it exists
Diffstat (limited to 'Arduino.mk')
-rw-r--r--Arduino.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/Arduino.mk b/Arduino.mk
index 623db90..c647aea 100644
--- a/Arduino.mk
+++ b/Arduino.mk
@@ -1320,7 +1320,7 @@ ifndef TAGS_FILE
TAGS_FILE = tags
endif
-# ctags command: append file with user options before
+# ctags command: append, flags unsort (as will be sorted after) and specify filename
CTAGS_CMD = $(CTAGS_EXEC) $(CTAGS_OPTS) -auf
########################################################################
@@ -1580,7 +1580,9 @@ generated_assembly: generate_assembly
.PHONY: tags
tags:
- rm -f $(shell pwd)/$(TAGS_FILE)
+ifneq ($(words $(wildcard $(TAGS_FILE))), 0)
+ rm -f $(TAGS_FILE)
+endif
@$(ECHO) "Generating tags for local sources (INO an PDE files as C++): "
$(CTAGS_CMD) $(TAGS_FILE) --langmap=c++:.ino --langmap=c++:.pde $(LOCAL_SRCS)
ifneq ($(words $(ARDUINO_LIBS)), 0)