Kbuild: reintroduce ALLSOURCE_ARCHS support for tags/cscope.
PATCH 1/1 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
--- scripts/tags.sh | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-)
scripts/tags.sh +13 -5
@@ -24,6 +24,11 @@ else tree=${srctree}/ fi +# Detect if ALLSOURCE_ARCHS is set. If not, we asssume SRCARCH +if [ "${ALLSOURCE_ARCHS}" = "" ]; then + ALLSOURCE_ARCHS=${SRCARCH} +fi + # find sources in arch/$ARCH find_arch_sources() {
@@ -54,26 +59,29 @@ find_other_sources() find_sources() { find_arch_sources $1 "$2" - find_include_sources "$2" - find_other_sources "$2" } all_sources() { - find_sources $SRCARCH '*.[chS]' + for arch in $ALLSOURCE_ARCHS + do + find_sources $arch '*.[chS]' + done if [ ! -z "$archinclude" ]; then find_arch_include_sources $archinclude '*.[chS]' fi + find_include_sources '*.[chS]' + find_other_sources '*.[chS]' } all_kconfigs() { - find_sources $SRCARCH 'Kconfig*' + find_sources $ALLSOURCE_ARCHS 'Kconfig*' } all_defconfigs() { - find_sources $SRCARCH "defconfig" + find_sources $ALLSOURCE_ARCHS "defconfig" } docscope()
Signature · 1 line
1.6.0.2.GIT
Quoted 7 lines · Jike Song
This patch reintroduce the
ALLSOURCE_ARCHSsupport for tags/TAGS/ cscope targets. TheKbuildpreviously has this feature, but after moving the targets intoscripts/tags.sh,ALLSOURCE_ARCHSdisappears.It's something like this:
$ make ALLSOURCE_ARCHS="x86 mips arm" tags cscope
Hi Jike.
Did you implment this feature because you really use it or did you do so because it was 'missing'?
I explicitly avoided the feature as I expected it to be used very seldom.
Sam
Quoted 5 lines · Sam Ravnborg
Quoted 4 lines · Jike Song
This patch reintroduce the
ALLSOURCE_ARCHSsupport for tags/TAGS/ cscope targets. TheKbuildpreviously has this feature, but after moving the targets intoscripts/tags.sh,ALLSOURCE_ARCHSdisappears.
Quoted 8 lines
Quoted 3 lines
It's something like this:
$ make ALLSOURCE_ARCHS="x86 mips arm" tags cscopeHi Jike.
Did you implment this feature because you really use it or did you do so because it was 'missing'?
There are many people who works on multiple architectures. As for me, I work on both x86 and MIPS, and I always specify ALLSOURCE_ARCHS="x86 mips" when building tags/cscope databases. I think this would be a useful feature for these people;-)
Anyway, it is dependent on your decision.
Quoted 3 lines
I explicitly avoided the feature as I expected it to be used very seldom.
Maybe just because it is undocumented?
Quoted 2 lines
Sam
Signature · 2 lines
Thanks, Jike
Quoted 7 lines · Jike Song
This patch reintroduce the
ALLSOURCE_ARCHSsupport for tags/TAGS/ cscope targets. TheKbuildpreviously has this feature, but after moving the targets intoscripts/tags.sh,ALLSOURCE_ARCHSdisappears.It's something like this:
$ make ALLSOURCE_ARCHS="x86 mips arm" tags cscope
A second point...
If you are serious about this then we need this documented somewhere. This is not "make help" material so I suggest you to add a new chapter in Documentation/kbuild/kbuild.txt where you could include this.
[The file is soon-to-be-present in mainline kernel, it is part of my second push for this merge window.
Sam
Quoted 7 lines · Sam Ravnborg
Quoted 6 lines · Jike Song
This patch reintroduce the
ALLSOURCE_ARCHSsupport for tags/TAGS/ cscope targets. TheKbuildpreviously has this feature, but after moving the targets intoscripts/tags.sh,ALLSOURCE_ARCHSdisappears.It's something like this:
Quoted 8 lines
Quoted 1 line
$ make ALLSOURCE_ARCHS="x86 mips arm" tags cscopeA second point...
If you are serious about this then we need this documented somewhere. This is not "make help" material so I suggest you to add a new chapter inDocumentation/kbuild/kbuild.txtwhere you could include this.
Excuse me, do you mean Documentation/kbuild/makefiles.txt instead?
Signature · 2 lines
Thanks, Jike
Quoted 11 lines · Jike Song
Quoted 10 lines · Sam Ravnborg
Quoted 7 lines · Jike Song
This patch reintroduce the
ALLSOURCE_ARCHSsupport for tags/TAGS/ cscope targets. TheKbuildpreviously has this feature, but after moving the targets intoscripts/tags.sh,ALLSOURCE_ARCHSdisappears.It's something like this:
$ make ALLSOURCE_ARCHS="x86 mips arm" tags cscope
Quoted 7 lines
Quoted 5 lines
A second point...
If you are serious about this then we need this documented somewhere. This is not "make help" material so I suggest you to add a new chapter inDocumentation/kbuild/kbuild.txtwhere you could include this.Excuse me, do you mean
Documentation/kbuild/makefiles.txtinstead?
Nope - I mean Documentation/kbuild/kbuild.txt
It is included in kbuild-next.git and will appear in mainline shortly.
Sam