build: introduce etags target

The tags target should only create tag file using ctags.
For those who like to run emacs, the new target etags is generating
the TAGS file.

Cc: Dmitry Safonov <dsafonov@virtuozzo.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
Laurent Dufour 2016-02-25 16:25:00 +03:00 committed by Pavel Emelyanov
parent 9cd6f0da6e
commit 377601f96f

View file

@ -176,9 +176,15 @@ tags:
$(call msg-gen, $@)
$(Q) $(RM) tags
$(Q) $(FIND) . -name '*.[hcS]' ! -path './.*' ! -path './test/*' -print | xargs $(CTAGS) -a
$(Q) $(FIND) . -name '*.[hcS]' ! -path './.*' ! -path './test/*' -print | xargs $(ETAGS) -a
PHONY += tags
etags:
$(call msg-gen, $@)
$(Q) $(RM) TAGS
$(Q) $(FIND) . -name '*.[hcS]' ! -path './.*' ! -path './test/*' -print | xargs $(ETAGS) -a
PHONY += etags
cscope:
$(call msg-gen, $@)
$(Q) $(FIND) . -name '*.[hcS]' ! -path './.*' ! -path './test/*' ! -type l -print > cscope.files
@ -218,6 +224,7 @@ help:
@echo ' dist - Create a source tarball'
@echo ' clean - Clean everything'
@echo ' tags - Generate tags file (ctags)'
@echo ' etags - Generate TAGS file (etags)'
@echo ' cscope - Generate cscope database'
@echo ' rebuild - Force-rebuild of [*] targets'
@echo ' test - Run zdtm test-suite'