summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile20
1 files changed, 12 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index faa8900097..55d0a98dc6 100644
--- a/Makefile
+++ b/Makefile
@@ -2727,20 +2727,24 @@ FIND_SOURCE_FILES = ( \
| sed -e 's|^\./||' \
)
-$(ETAGS_TARGET): FORCE
+FOUND_SOURCE_FILES = $(shell $(FIND_SOURCE_FILES))
+
+$(ETAGS_TARGET): $(FOUND_SOURCE_FILES)
$(QUIET_GEN)$(RM) "$(ETAGS_TARGET)+" && \
- $(FIND_SOURCE_FILES) | xargs etags -a -o "$(ETAGS_TARGET)+" && \
+ echo $(FOUND_SOURCE_FILES) | xargs etags -a -o "$(ETAGS_TARGET)+" && \
mv "$(ETAGS_TARGET)+" "$(ETAGS_TARGET)"
-tags: FORCE
+tags: $(FOUND_SOURCE_FILES)
$(QUIET_GEN)$(RM) tags+ && \
- $(FIND_SOURCE_FILES) | xargs ctags -a -o tags+ && \
+ echo $(FOUND_SOURCE_FILES) | xargs ctags -a -o tags+ && \
mv tags+ tags
-.PHONY: cscope
-cscope:
+cscope.out: $(FOUND_SOURCE_FILES)
$(QUIET_GEN)$(RM) cscope* && \
- $(FIND_SOURCE_FILES) | xargs cscope -b
+ echo $(FOUND_SOURCE_FILES) | xargs cscope -b
+
+.PHONY: cscope
+cscope: cscope.out
### Detect prefix changes
TRACK_PREFIX = $(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ):\
@@ -2921,7 +2925,7 @@ check: config-list.h command-list.h
exit 1; \
fi
-FOUND_C_SOURCES = $(filter %.c,$(shell $(FIND_SOURCE_FILES)))
+FOUND_C_SOURCES = $(filter %.c,$(FOUND_SOURCE_FILES))
COCCI_SOURCES = $(filter-out $(THIRD_PARTY_SOURCES),$(FOUND_C_SOURCES))
%.cocci.patch: %.cocci $(COCCI_SOURCES)