Merge branch 'ab/make-tags-cleanup'
Build clean-up for "make tags" and friends. * ab/make-tags-cleanup: Makefile: normalize clobbering & xargs for tags targets Makefile: remove "cscope.out", not "cscope*" in cscope.out target Makefile: don't use "FORCE" for tags targets Makefile: add QUIET_GEN to "cscope" target Makefile: move ".PHONY: cscope" near its target
This commit is contained in:
commit
1b8bd2243e
32
Makefile
32
Makefile
@ -2735,19 +2735,25 @@ FIND_SOURCE_FILES = ( \
|
|||||||
| sed -e 's|^\./||' \
|
| sed -e 's|^\./||' \
|
||||||
)
|
)
|
||||||
|
|
||||||
$(ETAGS_TARGET): FORCE
|
FOUND_SOURCE_FILES = $(shell $(FIND_SOURCE_FILES))
|
||||||
$(QUIET_GEN)$(RM) "$(ETAGS_TARGET)+" && \
|
|
||||||
$(FIND_SOURCE_FILES) | xargs etags -a -o "$(ETAGS_TARGET)+" && \
|
|
||||||
mv "$(ETAGS_TARGET)+" "$(ETAGS_TARGET)"
|
|
||||||
|
|
||||||
tags: FORCE
|
$(ETAGS_TARGET): $(FOUND_SOURCE_FILES)
|
||||||
$(QUIET_GEN)$(RM) tags+ && \
|
$(QUIET_GEN)$(RM) $@+ && \
|
||||||
$(FIND_SOURCE_FILES) | xargs ctags -a -o tags+ && \
|
echo $(FOUND_SOURCE_FILES) | xargs etags -a -o $@+ && \
|
||||||
mv tags+ tags
|
mv $@+ $@
|
||||||
|
|
||||||
cscope:
|
tags: $(FOUND_SOURCE_FILES)
|
||||||
$(RM) cscope*
|
$(QUIET_GEN)$(RM) $@+ && \
|
||||||
$(FIND_SOURCE_FILES) | xargs cscope -b
|
echo $(FOUND_SOURCE_FILES) | xargs ctags -a -o $@+ && \
|
||||||
|
mv $@+ $@
|
||||||
|
|
||||||
|
cscope.out: $(FOUND_SOURCE_FILES)
|
||||||
|
$(QUIET_GEN)$(RM) $@+ && \
|
||||||
|
echo $(FOUND_SOURCE_FILES) | xargs cscope -f$@+ -b && \
|
||||||
|
mv $@+ $@
|
||||||
|
|
||||||
|
.PHONY: cscope
|
||||||
|
cscope: cscope.out
|
||||||
|
|
||||||
### Detect prefix changes
|
### Detect prefix changes
|
||||||
TRACK_PREFIX = $(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ):\
|
TRACK_PREFIX = $(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ):\
|
||||||
@ -2936,7 +2942,7 @@ check: config-list.h command-list.h
|
|||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
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_SOURCES = $(filter-out $(THIRD_PARTY_SOURCES),$(FOUND_C_SOURCES))
|
||||||
|
|
||||||
%.cocci.patch: %.cocci $(COCCI_SOURCES)
|
%.cocci.patch: %.cocci $(COCCI_SOURCES)
|
||||||
@ -3266,7 +3272,7 @@ endif
|
|||||||
|
|
||||||
.PHONY: all install profile-clean cocciclean clean strip
|
.PHONY: all install profile-clean cocciclean clean strip
|
||||||
.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
|
.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
|
||||||
.PHONY: FORCE cscope
|
.PHONY: FORCE
|
||||||
|
|
||||||
### Check documentation
|
### Check documentation
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user