public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] scripts/tags.sh: Support subarch for ARM
@ 2012-12-03 16:22 Joonsoo Kim
  2012-12-03 16:22 ` [PATCH 2/2] scripts/tags.sh: Support compiled source Joonsoo Kim
  0 siblings, 1 reply; 4+ messages in thread
From: Joonsoo Kim @ 2012-12-03 16:22 UTC (permalink / raw)
  To: Michal Marek; +Cc: linux-kernel, Joonsoo Kim

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>

diff --git a/scripts/tags.sh b/scripts/tags.sh
index 79fdafb..a400c88 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,14 @@ 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
+		if ! [[ $i =~ .*-${SUBARCH}$ ]]; then
+			subarchprune="$subarchprune -wholename $i -prune -o"
+		fi
+	done
 fi
 
 remove_structs=
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-12-03 18:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-03 16:22 [PATCH 1/2] scripts/tags.sh: Support subarch for ARM Joonsoo Kim
2012-12-03 16:22 ` [PATCH 2/2] scripts/tags.sh: Support compiled source Joonsoo Kim
2012-12-03 16:39   ` Michal Marek
2012-12-03 18:09     ` JoonSoo Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox