]> git.lizzy.rs Git - rust.git/blob - mk/ctags.mk
Rollup merge of #38299 - achanda:ctrl-c, r=brson
[rust.git] / mk / ctags.mk
1 # Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2 # file at the top-level directory of this distribution and at
3 # http://rust-lang.org/COPYRIGHT.
4 #
5 # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 # option. This file may not be copied, modified, or distributed
9 # except according to those terms.
10
11 ######################################################################
12 # TAGS file creation.  No dependency tracking, just do it on demand.
13 # Requires Exuberant Ctags: http://ctags.sourceforge.net/index.html
14 ######################################################################
15
16 .PHONY: TAGS.emacs TAGS.vi
17
18 CTAGS_RUSTC_LOCATIONS=$(patsubst ${CFG_SRC_DIR}src/lib%test,, \
19                                 $(wildcard ${CFG_SRC_DIR}src/lib*)) ${CFG_SRC_DIR}src/libtest
20 CTAGS_LOCATIONS=$(patsubst ${CFG_SRC_DIR}src/librust%,, \
21                 $(patsubst ${CFG_SRC_DIR}src/lib%test,, \
22                                 $(wildcard ${CFG_SRC_DIR}src/lib*))) ${CFG_SRC_DIR}src/libtest
23 CTAGS_OPTS=--options="${CFG_SRC_DIR}src/etc/ctags.rust" --languages=Rust --recurse
24
25 TAGS.rustc.emacs:
26         ctags -e -f $@ ${CTAGS_OPTS} ${CTAGS_RUSTC_LOCATIONS}
27
28 TAGS.emacs:
29         ctags -e -f $@ ${CTAGS_OPTS} ${CTAGS_LOCATIONS}
30
31 TAGS.rustc.vi:
32         ctags -f $@ ${CTAGS_OPTS} ${CTAGS_RUSTC_LOCATIONS}
33
34 TAGS.vi:
35         ctags -f $@ ${CTAGS_OPTS} ${CTAGS_LOCATIONS}