diff options
| author | John Whittington <john@jbrengineering.co.uk> | 2017-09-03 13:19:36 +0100 |
|---|---|---|
| committer | John Whittington <john@jbrengineering.co.uk> | 2017-09-03 13:19:36 +0100 |
| commit | 04f0ee07280c823447afc4bb14b2ec6cf1b8e470 (patch) | |
| tree | b9007d9ebb8fde5de321ee847b9fde5d55d0af68 | |
| parent | 85db740a1c00ebfa61418e6182c85c723f6a8f8c (diff) | |
rm old tags file made safer and only if it exists
| -rw-r--r-- | Arduino.mk | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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) |
