diff options
author | Ian Campbell <ijc@hellion.org.uk> | 2005-06-23 06:25:54 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@mars.(none)> | 2005-07-13 18:07:04 -0400 |
commit | a0674e88d9c150e016a69e78e735f48772314c53 (patch) | |
tree | 749a25f86a745f2f8e94cdee2b8e1c4d1b0db28f | |
parent | acbef459a663a8349ceb46b5a11ede50fa7909c7 (diff) |
[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-- | Makefile | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -1159,19 +1159,25 @@ else | |||
1159 | __srctree = $(srctree)/ | 1159 | __srctree = $(srctree)/ |
1160 | endif | 1160 | endif |
1161 | 1161 | ||
1162 | ALLSOURCE_ARCHS := $(ARCH) | ||
1163 | |||
1162 | define all-sources | 1164 | define all-sources |
1163 | ( find $(__srctree) $(RCS_FIND_IGNORE) \ | 1165 | ( find $(__srctree) $(RCS_FIND_IGNORE) \ |
1164 | \( -name include -o -name arch \) -prune -o \ | 1166 | \( -name include -o -name arch \) -prune -o \ |
1165 | -name '*.[chS]' -print; \ | 1167 | -name '*.[chS]' -print; \ |
1166 | find $(__srctree)arch/$(ARCH) $(RCS_FIND_IGNORE) \ | 1168 | for ARCH in $(ALLSOURCE_ARCHS) ; do \ |
1167 | -name '*.[chS]' -print; \ | 1169 | find $(__srctree)arch/$${ARCH} $(RCS_FIND_IGNORE) \ |
1170 | -name '*.[chS]' -print; \ | ||
1171 | done ; \ | ||
1168 | find $(__srctree)security/selinux/include $(RCS_FIND_IGNORE) \ | 1172 | find $(__srctree)security/selinux/include $(RCS_FIND_IGNORE) \ |
1169 | -name '*.[chS]' -print; \ | 1173 | -name '*.[chS]' -print; \ |
1170 | find $(__srctree)include $(RCS_FIND_IGNORE) \ | 1174 | find $(__srctree)include $(RCS_FIND_IGNORE) \ |
1171 | \( -name config -o -name 'asm-*' \) -prune \ | 1175 | \( -name config -o -name 'asm-*' \) -prune \ |
1172 | -o -name '*.[chS]' -print; \ | 1176 | -o -name '*.[chS]' -print; \ |
1173 | find $(__srctree)include/asm-$(ARCH) $(RCS_FIND_IGNORE) \ | 1177 | for ARCH in $(ALLSOURCE_ARCHS) ; do \ |
1174 | -name '*.[chS]' -print; \ | 1178 | find $(__srctree)include/asm-$${ARCH} $(RCS_FIND_IGNORE) \ |
1179 | -name '*.[chS]' -print; \ | ||
1180 | done ; \ | ||
1175 | find $(__srctree)include/asm-generic $(RCS_FIND_IGNORE) \ | 1181 | find $(__srctree)include/asm-generic $(RCS_FIND_IGNORE) \ |
1176 | -name '*.[chS]' -print ) | 1182 | -name '*.[chS]' -print ) |
1177 | endef | 1183 | endef |