Skip to content

Commit f81e7c6

Browse files
Fredrik KuivinenJunio C Hamano
authored andcommitted
Makefile: Add TAGS and tags targets
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 451d7b4 commit f81e7c6

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,13 @@ $(LIB_FILE): $(LIB_OBJS)
553553
doc:
554554
$(MAKE) -C Documentation all
555555

556+
TAGS:
557+
rm -f TAGS
558+
find . -name '*.[hcS]' -print | xargs etags -a
559+
560+
tags:
561+
rm -f tags
562+
find . -name '*.[hcS]' -print | xargs ctags -a
556563

557564
### Testing rules
558565

@@ -617,7 +624,7 @@ rpm: dist
617624
clean:
618625
rm -f *.o mozilla-sha1/*.o arm/*.o ppc/*.o compat/*.o $(LIB_FILE)
619626
rm -f $(ALL_PROGRAMS) git$X
620-
rm -f *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h
627+
rm -f *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags
621628
rm -rf $(GIT_TARNAME)
622629
rm -f $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz
623630
$(MAKE) -C Documentation/ clean
@@ -626,5 +633,5 @@ clean:
626633
rm -f GIT-VERSION-FILE
627634

628635
.PHONY: all install clean strip
629-
.PHONY: .FORCE-GIT-VERSION-FILE
636+
.PHONY: .FORCE-GIT-VERSION-FILE TAGS tags
630637

0 commit comments

Comments
 (0)