aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoonsoo Kim <js1304@gmail.com>2012-12-10 10:11:45 -0500
committerMichal Marek <mmarek@suse.cz>2012-12-11 08:24:35 -0500
commit596585090a6d7f0a62b4e5864ad8cedf1af964d1 (patch)
treed5525acd3397c990a4455c59fddfbd0d8ab654e9
parentad99ac2fa76b4a793ee801920f7501c8df6534d0 (diff)
scripts/tags.sh: Support subarch for ARM
Current tags.sh doesn't handle subarch for ARM. There are too many subarch on ARM, it is hard that we locate some functions which are defined in every subarch with tags util family. Therefore support subarch for removing this unconvenience. We can use ARM subarch functionality like below. "make cscope O=. SRCARCH=arm SUBARCH=xxx" Signed-off-by: Joonsoo Kim <js1304@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
-rwxr-xr-xscripts/tags.sh20
1 files changed, 18 insertions, 2 deletions
diff --git a/scripts/tags.sh b/scripts/tags.sh
index 79fdafb0d263..8fb18d1da71b 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -48,13 +48,14 @@ find_arch_sources()
48 for i in $archincludedir; do 48 for i in $archincludedir; do
49 prune="$prune -wholename $i -prune -o" 49 prune="$prune -wholename $i -prune -o"
50 done 50 done
51 find ${tree}arch/$1 $ignore $prune -name "$2" -print; 51 find ${tree}arch/$1 $ignore $subarchprune $prune -name "$2" -print;
52} 52}
53 53
54# find sources in arch/$1/include 54# find sources in arch/$1/include
55find_arch_include_sources() 55find_arch_include_sources()
56{ 56{
57 include=$(find ${tree}arch/$1/ -name include -type d); 57 include=$(find ${tree}arch/$1/ $subarchprune \
58 -name include -type d -print);
58 if [ -n "$include" ]; then 59 if [ -n "$include" ]; then
59 archincludedir="$archincludedir $include" 60 archincludedir="$archincludedir $include"
60 find $include $ignore -name "$2" -print; 61 find $include $ignore -name "$2" -print;
@@ -234,6 +235,21 @@ if [ "${ARCH}" = "um" ]; then
234 else 235 else
235 archinclude=${SUBARCH} 236 archinclude=${SUBARCH}
236 fi 237 fi
238elif [ "${SRCARCH}" = "arm" -a "${SUBARCH}" != "" ]; then
239 subarchdir=$(find ${tree}arch/$SRCARCH/ -name "mach-*" -type d -o \
240 -name "plat-*" -type d);
241 for i in $subarchdir; do
242 case "$i" in
243 *"mach-"${SUBARCH})
244 ;;
245 *"plat-"${SUBARCH})
246 ;;
247 *)
248 subarchprune="$subarchprune \
249 -wholename $i -prune -o"
250 ;;
251 esac
252 done
237fi 253fi
238 254
239remove_structs= 255remove_structs=