Makefile: Add "make ctags"
authorFam Zheng <famz@redhat.com>
Fri, 22 May 2015 05:35:08 +0000 (13:35 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 23 Jun 2015 17:23:39 +0000 (20:23 +0300)
This generates ctags file

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Makefile

index ea0b292..c9be643 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ BUILD_DIR=$(CURDIR)
 # Before including a proper config-host.mak, assume we are in the source tree
 SRC_PATH=.
 
-UNCHECKED_GOALS := %clean TAGS cscope
+UNCHECKED_GOALS := %clean TAGS cscope ctags
 
 # All following code might depend on configuration variables
 ifneq ($(wildcard config-host.mak),)
@@ -454,6 +454,11 @@ endif
 test speed: all
        $(MAKE) -C tests/tcg $@
 
+.PHONY: ctags
+ctags:
+       rm -f $@
+       find "$(SRC_PATH)" -name '*.[hc]' -exec ctags --append {} +
+
 .PHONY: TAGS
 TAGS:
        rm -f $@