From: Joonsoo Kim <js1304@gmail.com>
To: Michal Marek <mmarek@suse.cz>
Cc: linux-kernel@vger.kernel.org, Joonsoo Kim <js1304@gmail.com>
Subject: [PATCH v3 1/2] scripts/tags.sh: Support subarch for ARM
Date: Tue, 11 Dec 2012 00:11:45 +0900 [thread overview]
Message-ID: <1355152306-4513-1-git-send-email-js1304@gmail.com> (raw)
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>
---
v2: change bash specific '[[]]' to 'case in' statement.
v3: quote the patterns.
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=
--
1.7.9.5
next reply other threads:[~2012-12-10 15:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-10 15:11 Joonsoo Kim [this message]
2012-12-10 15:11 ` [PATCH v3 2/2] scripts/tags.sh: Support compiled source Joonsoo Kim
2012-12-11 13:40 ` Michal Marek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1355152306-4513-1-git-send-email-js1304@gmail.com \
--to=js1304@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).