public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Allow cscope to index multiple architectures
@ 2005-06-23 10:25 Ian Campbell
  2005-07-13 21:43 ` Sam Ravnborg
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Campbell @ 2005-06-23 10:25 UTC (permalink / raw)
  To: kai, sam; +Cc: linux-kernel

Hi,

I have a single source tree which I cross compile for a couple of
different architectures using ARHC=foo O=blah etc.

The existing cscope target is very handy but only indexes the current
$(ARCH), which is a pain since inevitably I'm interested in the other
one at any given time ;-). This patch allows me to pass a list of
architectures for cscope to index. e.g.
	make ALLSOURCE_ARCHS="i386 arm" cscope

This change also works for etags etc, and I presume it is just as useful
there.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>

Index: 2.6/Makefile
===================================================================
--- 2.6.orig/Makefile	2005-06-23 11:15:05.000000000 +0100
+++ 2.6/Makefile	2005-06-23 11:24:12.000000000 +0100
@@ -1156,19 +1156,25 @@
 __srctree = $(srctree)/
 endif
 
+ALLSOURCE_ARCHS := $(ARCH)
+
 define all-sources
 	( find $(__srctree) $(RCS_FIND_IGNORE) \
 	       \( -name include -o -name arch \) -prune -o \
 	       -name '*.[chS]' -print; \
-	  find $(__srctree)arch/$(ARCH) $(RCS_FIND_IGNORE) \
-	       -name '*.[chS]' -print; \
+	  for ARCH in $(ALLSOURCE_ARCHS) ; do \
+	       find $(__srctree)arch/$${ARCH} $(RCS_FIND_IGNORE) \
+	            -name '*.[chS]' -print; \
+	  done ; \
 	  find $(__srctree)security/selinux/include $(RCS_FIND_IGNORE) \
 	       -name '*.[chS]' -print; \
 	  find $(__srctree)include $(RCS_FIND_IGNORE) \
 	       \( -name config -o -name 'asm-*' \) -prune \
 	       -o -name '*.[chS]' -print; \
-	  find $(__srctree)include/asm-$(ARCH) $(RCS_FIND_IGNORE) \
-	       -name '*.[chS]' -print; \
+	  for ARCH in $(ALLSOURCE_ARCHS) ; do \
+	       find $(__srctree)include/asm-$${ARCH} $(RCS_FIND_IGNORE) \
+	            -name '*.[chS]' -print; \
+	  done ; \
 	  find $(__srctree)include/asm-generic $(RCS_FIND_IGNORE) \
 	       -name '*.[chS]' -print )
 endef



-- 
Ian Campbell
Current Noise: Devin Townsend - Seventh Wave

I am a deeply superficial person.
		-- Andy Warhol


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

* Re: [PATCH] Allow cscope to index multiple architectures
  2005-07-13 21:43 ` Sam Ravnborg
@ 2005-07-13 20:10   ` Ian Campbell
  2005-07-13 22:01     ` Sam Ravnborg
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Campbell @ 2005-07-13 20:10 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: kai, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1276 bytes --]

On Wed, 2005-07-13 at 21:43 +0000, Sam Ravnborg wrote:
> On Thu, Jun 23, 2005 at 11:25:54AM +0100, Ian Campbell wrote:
> > Hi,
> > 
> > I have a single source tree which I cross compile for a couple of
> > different architectures using ARHC=foo O=blah etc.
> > 
> > The existing cscope target is very handy but only indexes the current
> > $(ARCH), which is a pain since inevitably I'm interested in the other
> > one at any given time ;-). This patch allows me to pass a list of
> > architectures for cscope to index. e.g.
> > 	make ALLSOURCE_ARCHS="i386 arm" cscope
> > 
> > This change also works for etags etc, and I presume it is just as useful
> > there.
> 
> I cannot see how it will index i386 if I do not specify ALLSOURCES_ARCHS
> (and I am running on a i386).

The patch has: 

+ALLSOURCE_ARCHS := $(ARCH)

won't that do it? I thought $(ARCH) would be i386 so ALLSOURCE_ARCHS
will be too unless you override it.

I thought I'd tested non-ALLSOURCE_ARCHS but it was quite a while back
so I can't say for sure... I'll have a look when I get to work tomorrow
though.

Ian.
-- 
Ian Campbell

critic, n.:
	A person who boasts himself hard to please because nobody tries
	to please him.
		-- Ambrose Bierce, "The Devil's Dictionary"

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [PATCH] Allow cscope to index multiple architectures
  2005-06-23 10:25 [PATCH] Allow cscope to index multiple architectures Ian Campbell
@ 2005-07-13 21:43 ` Sam Ravnborg
  2005-07-13 20:10   ` Ian Campbell
  0 siblings, 1 reply; 4+ messages in thread
From: Sam Ravnborg @ 2005-07-13 21:43 UTC (permalink / raw)
  To: Ian Campbell; +Cc: kai, linux-kernel

On Thu, Jun 23, 2005 at 11:25:54AM +0100, Ian Campbell wrote:
> Hi,
> 
> I have a single source tree which I cross compile for a couple of
> different architectures using ARHC=foo O=blah etc.
> 
> The existing cscope target is very handy but only indexes the current
> $(ARCH), which is a pain since inevitably I'm interested in the other
> one at any given time ;-). This patch allows me to pass a list of
> architectures for cscope to index. e.g.
> 	make ALLSOURCE_ARCHS="i386 arm" cscope
> 
> This change also works for etags etc, and I presume it is just as useful
> there.

I cannot see how it will index i386 if I do not specify ALLSOURCES_ARCHS
(and I am running on a i386).

	Sam

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

* Re: [PATCH] Allow cscope to index multiple architectures
  2005-07-13 20:10   ` Ian Campbell
@ 2005-07-13 22:01     ` Sam Ravnborg
  0 siblings, 0 replies; 4+ messages in thread
From: Sam Ravnborg @ 2005-07-13 22:01 UTC (permalink / raw)
  To: Ian Campbell; +Cc: kai, linux-kernel

> 
> The patch has: 
> 
> +ALLSOURCE_ARCHS := $(ARCH)
> 
> won't that do it? I thought $(ARCH) would be i386 so ALLSOURCE_ARCHS
> will be too unless you override it.

I overlooked that part.
Applied.

	Sam

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

end of thread, other threads:[~2005-07-13 20:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-23 10:25 [PATCH] Allow cscope to index multiple architectures Ian Campbell
2005-07-13 21:43 ` Sam Ravnborg
2005-07-13 20:10   ` Ian Campbell
2005-07-13 22:01     ` Sam Ravnborg

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