public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Kbuild: reintroduce ALLSOURCE_ARCHS support for tags/cscope.
@ 2008-12-31 13:37 Jike Song
  2009-01-02 22:32 ` Sam Ravnborg
  2009-01-02 22:34 ` Sam Ravnborg
  0 siblings, 2 replies; 6+ messages in thread
From: Jike Song @ 2008-12-31 13:37 UTC (permalink / raw)
  To: sam; +Cc: linux-kbuild, Jike Song

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: Jike Song <albcamus@gmail.com>
---
 scripts/tags.sh |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/scripts/tags.sh b/scripts/tags.sh
index 4e75472..9c954d9 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -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()
-- 
1.6.0.2.GIT


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

* Re: [PATCH] Kbuild: reintroduce ALLSOURCE_ARCHS support for tags/cscope.
  2008-12-31 13:37 [PATCH] Kbuild: reintroduce ALLSOURCE_ARCHS support for tags/cscope Jike Song
@ 2009-01-02 22:32 ` Sam Ravnborg
  2009-01-03 14:05   ` Jike Song
  2009-01-02 22:34 ` Sam Ravnborg
  1 sibling, 1 reply; 6+ messages in thread
From: Sam Ravnborg @ 2009-01-02 22:32 UTC (permalink / raw)
  To: Jike Song; +Cc: linux-kbuild

On Wed, Dec 31, 2008 at 09:37:36PM +0800, Jike Song wrote:
> 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

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

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

* Re: [PATCH] Kbuild: reintroduce ALLSOURCE_ARCHS support for tags/cscope.
  2008-12-31 13:37 [PATCH] Kbuild: reintroduce ALLSOURCE_ARCHS support for tags/cscope Jike Song
  2009-01-02 22:32 ` Sam Ravnborg
@ 2009-01-02 22:34 ` Sam Ravnborg
  2009-01-03 14:10   ` Jike Song
  1 sibling, 1 reply; 6+ messages in thread
From: Sam Ravnborg @ 2009-01-02 22:34 UTC (permalink / raw)
  To: Jike Song; +Cc: linux-kbuild

On Wed, Dec 31, 2008 at 09:37:36PM +0800, Jike Song wrote:
> 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


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

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

* Re: [PATCH] Kbuild: reintroduce ALLSOURCE_ARCHS support for tags/cscope.
  2009-01-02 22:32 ` Sam Ravnborg
@ 2009-01-03 14:05   ` Jike Song
  0 siblings, 0 replies; 6+ messages in thread
From: Jike Song @ 2009-01-03 14:05 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-kbuild

On Sat, Jan 3, 2009 at 6:32 AM, Sam Ravnborg <sam@ravnborg.org> wrote:
> On Wed, Dec 31, 2008 at 09:37:36PM +0800, Jike Song wrote:
>> 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
>
> Hi 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.

>
> I explicitly avoided the feature as I expected it to be used
> very seldom.

Maybe just because it is undocumented?

>        Sam
>


-- 
Thanks,
Jike

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

* Re: [PATCH] Kbuild: reintroduce ALLSOURCE_ARCHS support for tags/cscope.
  2009-01-02 22:34 ` Sam Ravnborg
@ 2009-01-03 14:10   ` Jike Song
  2009-01-03 20:20     ` Sam Ravnborg
  0 siblings, 1 reply; 6+ messages in thread
From: Jike Song @ 2009-01-03 14:10 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-kbuild

On Sat, Jan 3, 2009 at 6:34 AM, Sam Ravnborg <sam@ravnborg.org> wrote:
> On Wed, Dec 31, 2008 at 09:37:36PM +0800, Jike Song wrote:
>> 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
>
>
> 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.

Excuse me, do you mean Documentation/kbuild/makefiles.txt instead?

-- 
Thanks,
Jike

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

* Re: [PATCH] Kbuild: reintroduce ALLSOURCE_ARCHS support for tags/cscope.
  2009-01-03 14:10   ` Jike Song
@ 2009-01-03 20:20     ` Sam Ravnborg
  0 siblings, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2009-01-03 20:20 UTC (permalink / raw)
  To: Jike Song; +Cc: linux-kbuild

On Sat, Jan 03, 2009 at 10:10:15PM +0800, Jike Song wrote:
> On Sat, Jan 3, 2009 at 6:34 AM, Sam Ravnborg <sam@ravnborg.org> wrote:
> > On Wed, Dec 31, 2008 at 09:37:36PM +0800, Jike Song wrote:
> >> 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
> >
> >
> > 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.
> 
> Excuse me, do you mean Documentation/kbuild/makefiles.txt instead?

Nope - I mean Documentation/kbuild/kbuild.txt

It is included in kbuild-next.git and will appear in mainline
shortly.

	Sam

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

end of thread, other threads:[~2009-01-03 20:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-31 13:37 [PATCH] Kbuild: reintroduce ALLSOURCE_ARCHS support for tags/cscope Jike Song
2009-01-02 22:32 ` Sam Ravnborg
2009-01-03 14:05   ` Jike Song
2009-01-02 22:34 ` Sam Ravnborg
2009-01-03 14:10   ` Jike Song
2009-01-03 20:20     ` Sam Ravnborg

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