summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Campbell <ijc@hellion.org.uk>2005-06-23 11:25:54 +0100
committerSam Ravnborg <sam@mars.(none)>2005-07-13 22:07:04 +0000
commita0674e88d9c150e016a69e78e735f48772314c53 (patch)
tree749a25f86a745f2f8e94cdee2b8e1c4d1b0db28f
parentacbef459a663a8349ceb46b5a11ede50fa7909c7 (diff)
downloadop-kernel-dev-a0674e88d9c150e016a69e78e735f48772314c53.zip
op-kernel-dev-a0674e88d9c150e016a69e78e735f48772314c53.tar.gz
[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>
-rw-r--r--Makefile14
1 files changed, 10 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 8294cd7..206b283 100644
--- a/Makefile
+++ b/Makefile
@@ -1159,19 +1159,25 @@ else
__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
OpenPOWER on IntegriCloud