diff options
-rw-r--r-- | Documentation/kbuild/kbuild.txt | 7 | ||||
-rwxr-xr-x | scripts/tags.sh | 18 |
2 files changed, 20 insertions, 5 deletions
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt index 51771847e816..923f9ddee8f6 100644 --- a/Documentation/kbuild/kbuild.txt +++ b/Documentation/kbuild/kbuild.txt | |||
@@ -124,3 +124,10 @@ KBUILD_EXTRA_SYMBOLS | |||
124 | -------------------------------------------------- | 124 | -------------------------------------------------- |
125 | For modules use symbols from another modules. | 125 | For modules use symbols from another modules. |
126 | See more details in modules.txt. | 126 | See more details in modules.txt. |
127 | |||
128 | ALLSOURCE_ARCHS | ||
129 | -------------------------------------------------- | ||
130 | For tags/TAGS/cscope targets, you can specify more than one archs | ||
131 | to be included in the databases, separated by blankspace. e.g. | ||
132 | |||
133 | $ make ALLSOURCE_ARCHS="x86 mips arm" tags | ||
diff --git a/scripts/tags.sh b/scripts/tags.sh index 9e3451d2c3a1..fdbe78bb5e2b 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh | |||
@@ -24,6 +24,11 @@ else | |||
24 | tree=${srctree}/ | 24 | tree=${srctree}/ |
25 | fi | 25 | fi |
26 | 26 | ||
27 | # Detect if ALLSOURCE_ARCHS is set. If not, we assume SRCARCH | ||
28 | if [ "${ALLSOURCE_ARCHS}" = "" ]; then | ||
29 | ALLSOURCE_ARCHS=${SRCARCH} | ||
30 | fi | ||
31 | |||
27 | # find sources in arch/$ARCH | 32 | # find sources in arch/$ARCH |
28 | find_arch_sources() | 33 | find_arch_sources() |
29 | { | 34 | { |
@@ -54,26 +59,29 @@ find_other_sources() | |||
54 | find_sources() | 59 | find_sources() |
55 | { | 60 | { |
56 | find_arch_sources $1 "$2" | 61 | find_arch_sources $1 "$2" |
57 | find_include_sources "$2" | ||
58 | find_other_sources "$2" | ||
59 | } | 62 | } |
60 | 63 | ||
61 | all_sources() | 64 | all_sources() |
62 | { | 65 | { |
63 | find_sources $SRCARCH '*.[chS]' | 66 | for arch in $ALLSOURCE_ARCHS |
67 | do | ||
68 | find_sources $arch '*.[chS]' | ||
69 | done | ||
64 | if [ ! -z "$archinclude" ]; then | 70 | if [ ! -z "$archinclude" ]; then |
65 | find_arch_include_sources $archinclude '*.[chS]' | 71 | find_arch_include_sources $archinclude '*.[chS]' |
66 | fi | 72 | fi |
73 | find_include_sources '*.[chS]' | ||
74 | find_other_sources '*.[chS]' | ||
67 | } | 75 | } |
68 | 76 | ||
69 | all_kconfigs() | 77 | all_kconfigs() |
70 | { | 78 | { |
71 | find_sources $SRCARCH 'Kconfig*' | 79 | find_sources $ALLSOURCE_ARCHS 'Kconfig*' |
72 | } | 80 | } |
73 | 81 | ||
74 | all_defconfigs() | 82 | all_defconfigs() |
75 | { | 83 | { |
76 | find_sources $SRCARCH "defconfig" | 84 | find_sources $ALLSOURCE_ARCHS "defconfig" |
77 | } | 85 | } |
78 | 86 | ||
79 | docscope() | 87 | docscope() |