Commit 4f628248 authored by Jike Song's avatar Jike Song Committed by Sam Ravnborg

kbuild: reintroduce ALLSOURCE_ARCHS support for tags/cscope

This patch reintroduce the ALLSOURCE_ARCHS support for tags/TAGS/
cscope targets. The Kbuild previously has this feature, but after
moving the targets into scripts/tags.sh, ALLSOURCE_ARCHS disappears.

It's something like this:

	$ make ALLSOURCE_ARCHS="x86 mips arm" tags cscope
Signed-off-by: default avatarJike Song <albcamus@gmail.com>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent 40c8c85a
...@@ -124,3 +124,10 @@ KBUILD_EXTRA_SYMBOLS ...@@ -124,3 +124,10 @@ KBUILD_EXTRA_SYMBOLS
-------------------------------------------------- --------------------------------------------------
For modules use symbols from another modules. For modules use symbols from another modules.
See more details in modules.txt. See more details in modules.txt.
ALLSOURCE_ARCHS
--------------------------------------------------
For tags/TAGS/cscope targets, you can specify more than one archs
to be included in the databases, separated by blankspace. e.g.
$ make ALLSOURCE_ARCHS="x86 mips arm" tags
...@@ -24,6 +24,11 @@ else ...@@ -24,6 +24,11 @@ else
tree=${srctree}/ tree=${srctree}/
fi fi
# Detect if ALLSOURCE_ARCHS is set. If not, we assume SRCARCH
if [ "${ALLSOURCE_ARCHS}" = "" ]; then
ALLSOURCE_ARCHS=${SRCARCH}
fi
# find sources in arch/$ARCH # find sources in arch/$ARCH
find_arch_sources() find_arch_sources()
{ {
...@@ -54,26 +59,29 @@ find_other_sources() ...@@ -54,26 +59,29 @@ find_other_sources()
find_sources() find_sources()
{ {
find_arch_sources $1 "$2" find_arch_sources $1 "$2"
find_include_sources "$2"
find_other_sources "$2"
} }
all_sources() all_sources()
{ {
find_sources $SRCARCH '*.[chS]' for arch in $ALLSOURCE_ARCHS
do
find_sources $arch '*.[chS]'
done
if [ ! -z "$archinclude" ]; then if [ ! -z "$archinclude" ]; then
find_arch_include_sources $archinclude '*.[chS]' find_arch_include_sources $archinclude '*.[chS]'
fi fi
find_include_sources '*.[chS]'
find_other_sources '*.[chS]'
} }
all_kconfigs() all_kconfigs()
{ {
find_sources $SRCARCH 'Kconfig*' find_sources $ALLSOURCE_ARCHS 'Kconfig*'
} }
all_defconfigs() all_defconfigs()
{ {
find_sources $SRCARCH "defconfig" find_sources $ALLSOURCE_ARCHS "defconfig"
} }
docscope() docscope()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment