[PATCH] kbuild: allow cscope to index multiple architectures
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> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
parent
acbef459a6
commit
a0674e88d9
1 changed files with 10 additions and 4 deletions
14
Makefile
14
Makefile
|
@ -1159,19 +1159,25 @@ else
|
||||||
__srctree = $(srctree)/
|
__srctree = $(srctree)/
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ALLSOURCE_ARCHS := $(ARCH)
|
||||||
|
|
||||||
define all-sources
|
define all-sources
|
||||||
( find $(__srctree) $(RCS_FIND_IGNORE) \
|
( find $(__srctree) $(RCS_FIND_IGNORE) \
|
||||||
\( -name include -o -name arch \) -prune -o \
|
\( -name include -o -name arch \) -prune -o \
|
||||||
-name '*.[chS]' -print; \
|
-name '*.[chS]' -print; \
|
||||||
find $(__srctree)arch/$(ARCH) $(RCS_FIND_IGNORE) \
|
for ARCH in $(ALLSOURCE_ARCHS) ; do \
|
||||||
-name '*.[chS]' -print; \
|
find $(__srctree)arch/$${ARCH} $(RCS_FIND_IGNORE) \
|
||||||
|
-name '*.[chS]' -print; \
|
||||||
|
done ; \
|
||||||
find $(__srctree)security/selinux/include $(RCS_FIND_IGNORE) \
|
find $(__srctree)security/selinux/include $(RCS_FIND_IGNORE) \
|
||||||
-name '*.[chS]' -print; \
|
-name '*.[chS]' -print; \
|
||||||
find $(__srctree)include $(RCS_FIND_IGNORE) \
|
find $(__srctree)include $(RCS_FIND_IGNORE) \
|
||||||
\( -name config -o -name 'asm-*' \) -prune \
|
\( -name config -o -name 'asm-*' \) -prune \
|
||||||
-o -name '*.[chS]' -print; \
|
-o -name '*.[chS]' -print; \
|
||||||
find $(__srctree)include/asm-$(ARCH) $(RCS_FIND_IGNORE) \
|
for ARCH in $(ALLSOURCE_ARCHS) ; do \
|
||||||
-name '*.[chS]' -print; \
|
find $(__srctree)include/asm-$${ARCH} $(RCS_FIND_IGNORE) \
|
||||||
|
-name '*.[chS]' -print; \
|
||||||
|
done ; \
|
||||||
find $(__srctree)include/asm-generic $(RCS_FIND_IGNORE) \
|
find $(__srctree)include/asm-generic $(RCS_FIND_IGNORE) \
|
||||||
-name '*.[chS]' -print )
|
-name '*.[chS]' -print )
|
||||||
endef
|
endef
|
||||||
|
|
Loading…
Reference in a new issue