cgit

commit 6419c9b57c33a8a26d2775f01629f899afb61026

Author: Jamie Couture <jamie.couture@gmail.com>

Makefile: add tag target to generate ctags

Signed-off-by: Jamie Couture <jamie.couture@gmail.com>

 Makefile | 6 +++++-


diff --git a/Makefile b/Makefile
index eac24add8dbef19b526a999c56b67d435aa0e1f3..1e341295f64fc916595ee82f1c41ca24754c1ef2 100644
--- a/Makefile
+++ b/Makefile
@@ -73,6 +73,7 @@ 	QUIET_MM       = @echo '   ' MM $@;
 	QUIET_SUBDIR0  = +@subdir=
 	QUIET_SUBDIR1  = ;$(NO_SUBDIR) echo '   ' SUBDIR $$subdir; \
 			 $(MAKE) $(PRINT_DIR) -C $$subdir
+	QUIET_TAGS     = @echo '   ' TAGS $@;
 endif
 
 #
@@ -124,7 +125,7 @@
 
 .PHONY: all libgit test install uninstall clean force-version get-git \
 	doc clean-doc install-doc install-man install-html install-pdf \
-	uninstall-doc uninstall-man uninstall-html uninstall-pdf
+	uninstall-doc uninstall-man uninstall-html uninstall-pdf tags
 
 all: cgit
 
@@ -242,3 +243,6 @@ 	rm -f cgitrc.5 cgitrc.5.html cgitrc.5.pdf cgitrc.5.xml cgitrc.5.fo
 
 get-git:
 	curl $(GIT_URL) | tar -xjf - && rm -rf git && mv git-$(GIT_VER) git
+
+tags:
+	$(QUIET_TAGS)find . -name '*.[ch]' | xargs ctags