Enable ctags extern variable support

This is needed to fix https://github.com/bootlin/elixir/issues/61

Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
This commit is contained in:
Maxime Chretien 2020-05-26 12:13:37 +02:00
parent b6606359e0
commit 155733bdd9
2 changed files with 3 additions and 2 deletions

View file

@ -41,7 +41,8 @@ defTypeR = {
's': 'struct', 's': 'struct',
't': 'typedef', 't': 'typedef',
'u': 'union', 'u': 'union',
'v': 'variable' } 'v': 'variable',
'x': 'externvar'}
defTypeD = {v: k for k, v in defTypeR.items()} defTypeD = {v: k for k, v in defTypeR.items()}

View file

@ -162,7 +162,7 @@ parse_defs_C()
tmp=`mktemp -d` tmp=`mktemp -d`
full_path=$tmp/$opt2 full_path=$tmp/$opt2
git cat-file blob "$opt1" > "$full_path" git cat-file blob "$opt1" > "$full_path"
ctags -x --kinds-c=+p-m "$full_path" | ctags -x --kinds-c=+p+x-m "$full_path" |
grep -avE "^operator |CONFIG_" | grep -avE "^operator |CONFIG_" |
awk '{print $1" "$2" "$3}' awk '{print $1" "$2" "$3}'
rm "$full_path" rm "$full_path"