Skip to content

Commit bc75cc6

Browse files
John Kacurmichal42
authored andcommitted
tags: Add the ability to make tags for all archs using "all"
make ALLSOURCE_ARCHS=all tags - Document this in kbuild.txt Without this change you have to type each arch separately. Signed-off-by: John Kacur <jkacur@redhat.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
1 parent 4431d4c commit bc75cc6

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

‎Documentation/kbuild/kbuild.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,3 +162,7 @@ For tags/TAGS/cscope targets, you can specify more than one arch
162162
to be included in the databases, separated by blank space. E.g.:
163163

164164
$ make ALLSOURCE_ARCHS="x86 mips arm" tags
165+
166+
To get all available archs you can also specify all. E.g.:
167+
168+
$ make ALLSOURCE_ARCHS=all tags

‎scripts/tags.sh‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,20 @@ else
2424
tree=${srctree}/
2525
fi
2626

27+
# Find all available archs
28+
find_all_archs()
29+
{
30+
ALLSOURCE_ARCHS=""
31+
for arch in `ls ${tree}arch`; do
32+
ALLSOURCE_ARCHS="${ALLSOURCE_ARCHS} "${arch##\/}
33+
done
34+
}
35+
2736
# Detect if ALLSOURCE_ARCHS is set. If not, we assume SRCARCH
2837
if [ "${ALLSOURCE_ARCHS}" = "" ]; then
2938
ALLSOURCE_ARCHS=${SRCARCH}
39+
elif [ "${ALLSOURCE_ARCHS}" = "all" ]; then
40+
find_all_archs
3041
fi
3142

3243
# find sources in arch/$ARCH

0 commit comments

Comments
 (0)