diff options
Diffstat (limited to 'scripts/tags.sh')
-rwxr-xr-x | scripts/tags.sh | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/scripts/tags.sh b/scripts/tags.sh index 8fb18d1da71..08f06c00745 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh | |||
@@ -96,6 +96,32 @@ all_sources() | |||
96 | find_other_sources '*.[chS]' | 96 | find_other_sources '*.[chS]' |
97 | } | 97 | } |
98 | 98 | ||
99 | all_compiled_sources() | ||
100 | { | ||
101 | for i in $(all_sources); do | ||
102 | case "$i" in | ||
103 | *.[cS]) | ||
104 | j=${i/\.[cS]/\.o} | ||
105 | if [ -e $j ]; then | ||
106 | echo $i | ||
107 | fi | ||
108 | ;; | ||
109 | *) | ||
110 | echo $i | ||
111 | ;; | ||
112 | esac | ||
113 | done | ||
114 | } | ||
115 | |||
116 | all_target_sources() | ||
117 | { | ||
118 | if [ -n "$COMPILED_SOURCE" ]; then | ||
119 | all_compiled_sources | ||
120 | else | ||
121 | all_sources | ||
122 | fi | ||
123 | } | ||
124 | |||
99 | all_kconfigs() | 125 | all_kconfigs() |
100 | { | 126 | { |
101 | for arch in $ALLSOURCE_ARCHS; do | 127 | for arch in $ALLSOURCE_ARCHS; do |
@@ -111,18 +137,18 @@ all_defconfigs() | |||
111 | 137 | ||
112 | docscope() | 138 | docscope() |
113 | { | 139 | { |
114 | (echo \-k; echo \-q; all_sources) > cscope.files | 140 | (echo \-k; echo \-q; all_target_sources) > cscope.files |
115 | cscope -b -f cscope.out | 141 | cscope -b -f cscope.out |
116 | } | 142 | } |
117 | 143 | ||
118 | dogtags() | 144 | dogtags() |
119 | { | 145 | { |
120 | all_sources | gtags -i -f - | 146 | all_target_sources | gtags -i -f - |
121 | } | 147 | } |
122 | 148 | ||
123 | exuberant() | 149 | exuberant() |
124 | { | 150 | { |
125 | all_sources | xargs $1 -a \ | 151 | all_target_sources | xargs $1 -a \ |
126 | -I __initdata,__exitdata,__acquires,__releases \ | 152 | -I __initdata,__exitdata,__acquires,__releases \ |
127 | -I __read_mostly,____cacheline_aligned \ | 153 | -I __read_mostly,____cacheline_aligned \ |
128 | -I ____cacheline_aligned_in_smp \ | 154 | -I ____cacheline_aligned_in_smp \ |
@@ -174,7 +200,7 @@ exuberant() | |||
174 | 200 | ||
175 | emacs() | 201 | emacs() |
176 | { | 202 | { |
177 | all_sources | xargs $1 -a \ | 203 | all_target_sources | xargs $1 -a \ |
178 | --regex='/^(ENTRY|_GLOBAL)(\([^)]*\)).*/\2/' \ | 204 | --regex='/^(ENTRY|_GLOBAL)(\([^)]*\)).*/\2/' \ |
179 | --regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/' \ | 205 | --regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/' \ |
180 | --regex='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \ | 206 | --regex='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \ |
@@ -221,11 +247,10 @@ xtags() | |||
221 | elif $1 --version 2>&1 | grep -iq emacs; then | 247 | elif $1 --version 2>&1 | grep -iq emacs; then |
222 | emacs $1 | 248 | emacs $1 |
223 | else | 249 | else |
224 | all_sources | xargs $1 -a | 250 | all_target_sources | xargs $1 -a |
225 | fi | 251 | fi |
226 | } | 252 | } |
227 | 253 | ||
228 | |||
229 | # Support um (which uses SUBARCH) | 254 | # Support um (which uses SUBARCH) |
230 | if [ "${ARCH}" = "um" ]; then | 255 | if [ "${ARCH}" = "um" ]; then |
231 | if [ "$SUBARCH" = "i386" ]; then | 256 | if [ "$SUBARCH" = "i386" ]; then |