File tree Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -332,7 +332,6 @@ include $(CFG_SRC_DIR)/mk/autodep.mk
332
332
include $(CFG_SRC_DIR ) /mk/tools.mk
333
333
include $(CFG_SRC_DIR ) /mk/docs.mk
334
334
335
-
336
335
# #####################################################################
337
336
# Secondary makefiles, conditionalized for speed
338
337
# #####################################################################
@@ -378,4 +377,10 @@ endif
378
377
ifneq ($(findstring install,$(MAKECMDGOALS ) ) ,)
379
378
CFG_INFO := $(info cfg: including install rules)
380
379
include $(CFG_SRC_DIR ) /mk/install.mk
381
- endif
380
+ endif
381
+
382
+ ifneq ($(strip $(findstring TAGS.emacs,$(MAKECMDGOALS ) ) \
383
+ $(findstring TAGS.vi,$(MAKECMDGOALS ) ) ) ,)
384
+ CFG_INFO := $(info cfg: including ctags rules)
385
+ include $(CFG_SRC_DIR ) /mk/ctags.mk
386
+ endif
Original file line number Diff line number Diff line change
1
+ # #####################################################################
2
+ # TAGS file creation. No dependency tracking, just do it on demand.
3
+ # Requires Exuberant Ctags: http://ctags.sourceforge.net/index.html
4
+ # #####################################################################
5
+
6
+ CTAGS_OPTS=--options =${CFG_SRC_DIR}/mk/ctags.rust -R ${CFG_SRC_DIR}/src
7
+
8
+ TAGS.emacs :
9
+ ctags -e -f $@ ${CTAGS_OPTS}
10
+
11
+ TAGS.vi :
12
+ ctags -f $@ ${CTAGS_OPTS}
Original file line number Diff line number Diff line change
1
+ --langdef=rust
2
+ --langmap=rust:.rs
3
+ --regex-rust=/[ \t]*fn[ \t]+([a-zA-Z0-9_]+)/\1/f,function/
4
+ --regex-rust=/[ \t]*type[ \t]+([a-zA-Z0-9_]+)/\1/T,types/
5
+ --regex-rust=/[ \t]*tag[ \t]+([a-zA-Z0-9_]+)/\1/T,types/
6
+ --regex-rust=/[ \t]*resource[ \t]+([a-zA-Z0-9_]+)/\1/T,types/
7
+ --regex-rust=/[ \t]*mod[ \t]+([a-zA-Z0-9_]+)/\1/m,modules/
You can’t perform that action at this time.
0 commit comments