Allow cscope to index multiple architectures
PATCH 1/1 Allow cscope to index multiple architectures
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.
Makefile +10 -4
@@ -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
Signature · 5 lines
Ian Campbell Current Noise: Devin Townsend - Seventh Wave I am a deeply superficial person. -- Andy Warhol
Quoted 5 lines · Ian Campbell
Hi,
I have a single source tree which I cross compile for a couple of different architectures using ARHC=foo O=blah etc.
Quoted 8 lines
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" cscopeThis 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
Quoted 12 lines · Sam Ravnborg
Quoted 11 lines · Ian Campbell
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
Quoted 5 lines
Quoted 2 lines
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.
Signature · 6 lines
Ian Campbell critic, n.: A person who boasts himself hard to please because nobody tries to please him. -- Ambrose Bierce, "The Devil's Dictionary"
Quoted 7 lines
The patch has:
+ALLSOURCE_ARCHS := $(ARCH)
won't that do it? I thought $(ARCH) would be i386 so
ALLSOURCE_ARCHSwill be too unless you override it.
I overlooked that part.
Applied.
Sam