makefile: Add a cscope target
The current makefile supports ctags but not cscope. Some people prefer cscope (I do), so this patch adds a cscope target. I've also added cscope* to the .gitignore file. For some reason tags and TAGS weren't in there either so I've added them too. Signed-off-by: Kristof Provost <Kristof@provost-engineering.be> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Kristof Provost committed
Oct 6, 2007 at 16:24 UTC
a2a9150bf06bdab419016003fa1bc04905d0f4fb
2 files changed
+9
-2
.gitignore
+3
@@ -171,3 +171,6 @@ config.status
171
config.mak.autogen
172
config.mak.append
173
configure
174
+tags
175
+TAGS
176
+cscope*
Makefile
+6
-2
@@ -947,6 +947,10 @@ tags:
947
$(RM) tags
948
$(FIND) . -name '*.[hcS]' -print | xargs ctags -a
949
950
+cscope:
951
+ $(RM) cscope*
952
+ $(FIND) . -name '*.[hcS]' -print | xargs cscope -b
953
+
954
### Detect prefix changes
955
TRACK_CFLAGS = $(subst ','\'',$(ALL_CFLAGS)):\
956
$(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ)
@@ -1093,7 +1097,7 @@ clean:
1097
$(LIB_FILE) $(XDIFF_LIB)
1098
$(RM) $(ALL_PROGRAMS) $(BUILT_INS) git$X
1099
$(RM) $(TEST_PROGRAMS)
1096
- $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags
1100
+ $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags cscope*
1101
$(RM) -r autom4te.cache
1102
$(RM) configure config.log config.mak.autogen config.mak.append config.status config.cache
1103
$(RM) -r $(GIT_TARNAME) .doc-tmp-dir
@@ -1111,7 +1115,7 @@ endif
1115
$(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-GUI-VARS
1116
1117
.PHONY: all install clean strip
1114
-.PHONY: .FORCE-GIT-VERSION-FILE TAGS tags .FORCE-GIT-CFLAGS
1118
+.PHONY: .FORCE-GIT-VERSION-FILE TAGS tags cscope .FORCE-GIT-CFLAGS
1119
1120
### Check documentation
1121
#