summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoonsoo Kim <js1304@gmail.com>2012-12-11 00:11:45 +0900
committerMichal Marek <mmarek@suse.cz>2012-12-11 14:24:35 +0100
commit596585090a6d7f0a62b4e5864ad8cedf1af964d1 (patch)
treed5525acd3397c990a4455c59fddfbd0d8ab654e9
parentad99ac2fa76b4a793ee801920f7501c8df6534d0 (diff)
downloadop-kernel-dev-596585090a6d7f0a62b4e5864ad8cedf1af964d1.zip
op-kernel-dev-596585090a6d7f0a62b4e5864ad8cedf1af964d1.tar.gz
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 79fdafb..8fb18d1 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -48,13 +48,14 @@ find_arch_sources()
for i in $archincludedir; do
prune="$prune -wholename $i -prune -o"
done
- find ${tree}arch/$1 $ignore $prune -name "$2" -print;
+ find ${tree}arch/$1 $ignore $subarchprune $prune -name "$2" -print;
}
# find sources in arch/$1/include
find_arch_include_sources()
{
- include=$(find ${tree}arch/$1/ -name include -type d);
+ include=$(find ${tree}arch/$1/ $subarchprune \
+ -name include -type d -print);
if [ -n "$include" ]; then
archincludedir="$archincludedir $include"
find $include $ignore -name "$2" -print;
@@ -234,6 +235,21 @@ if [ "${ARCH}" = "um" ]; then
else
archinclude=${SUBARCH}
fi
+elif [ "${SRCARCH}" = "arm" -a "${SUBARCH}" != "" ]; then
+ subarchdir=$(find ${tree}arch/$SRCARCH/ -name "mach-*" -type d -o \
+ -name "plat-*" -type d);
+ for i in $subarchdir; do
+ case "$i" in
+ *"mach-"${SUBARCH})
+ ;;
+ *"plat-"${SUBARCH})
+ ;;
+ *)
+ subarchprune="$subarchprune \
+ -wholename $i -prune -o"
+ ;;
+ esac
+ done
fi
remove_structs=
OpenPOWER on IntegriCloud