|
15 | 15 |
|
16 | 16 | .PHONY: TAGS.emacs TAGS.vi |
17 | 17 |
|
18 | | -# This is using a blacklist approach, probably more durable than a whitelist. |
19 | | -# We exclude: external dependencies (llvm, rt/{msvc,vg}), |
20 | | -# tests (compiletest, test) and a couple of other things (rt/arch, etc) |
21 | | -CTAGS_LOCATIONS=$(patsubst ${CFG_SRC_DIR}src/llvm,, \ |
22 | | - $(patsubst ${CFG_SRC_DIR}src/compiletest,, \ |
23 | | - $(patsubst ${CFG_SRC_DIR}src/test,, \ |
24 | | - $(patsubst ${CFG_SRC_DIR}src/etc,, \ |
25 | | - $(patsubst ${CFG_SRC_DIR}src/rt,, \ |
26 | | - $(patsubst ${CFG_SRC_DIR}src/rt/arch,, \ |
27 | | - $(patsubst ${CFG_SRC_DIR}src/rt/msvc,, \ |
28 | | - $(patsubst ${CFG_SRC_DIR}src/rt/vg,, \ |
29 | | - $(wildcard ${CFG_SRC_DIR}src/*) $(wildcard ${CFG_SRC_DIR}src/rt/*) \ |
30 | | - )))))))) |
31 | | -CTAGS_OPTS=--options="${CFG_SRC_DIR}src/etc/ctags.rust" --languages=-javascript --recurse ${CTAGS_LOCATIONS} |
32 | | -# We could use `--languages=Rust`, but there is value in producing tags for the |
33 | | -# C++ parts of the code base too (at the time of writing, those are .h and .cpp |
34 | | -# files in src/rt, src/rt/sync and src/rustllvm); we mainly just want to |
35 | | -# exclude the external dependencies. |
| 18 | +CTAGS_LOCATIONS=$(wildcard ${CFG_SRC_DIR}src/lib*) |
| 19 | +CTAGS_LOCATIONS=$(patsubst ${CFG_SRC_DIR}src/librust%,, \ |
| 20 | + $(patsubst ${CFG_SRC_DIR}src/lib%test,, \ |
| 21 | + $(wildcard ${CFG_SRC_DIR}src/lib*))) ${CFG_SRC_DIR}src/libtest |
| 22 | +CTAGS_OPTS=--options="${CFG_SRC_DIR}src/etc/ctags.rust" --languages=Rust --recurse ${CTAGS_LOCATIONS} |
36 | 23 |
|
37 | 24 | TAGS.emacs: |
38 | 25 | ctags -e -f $@ ${CTAGS_OPTS} |
|
0 commit comments