diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/tags.sh | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/scripts/tags.sh b/scripts/tags.sh index 1a0c44d7c4a7..c1220419e59d 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh | |||
@@ -32,13 +32,20 @@ fi | |||
32 | # find sources in arch/$ARCH | 32 | # find sources in arch/$ARCH |
33 | find_arch_sources() | 33 | find_arch_sources() |
34 | { | 34 | { |
35 | find ${tree}arch/$1 $ignore -name "$2" -print; | 35 | for i in $archincludedir; do |
36 | prune="$prune -wholename $i -prune -o" | ||
37 | done | ||
38 | find ${tree}arch/$1 $ignore $prune -name "$2" -print; | ||
36 | } | 39 | } |
37 | 40 | ||
38 | # find sources in arch/$1/include | 41 | # find sources in arch/$1/include |
39 | find_arch_include_sources() | 42 | find_arch_include_sources() |
40 | { | 43 | { |
41 | find ${tree}arch/$1/include $ignore -name "$2" -print; | 44 | include=$(find ${tree}arch/$1/ -name include -type d); |
45 | if [ -n "$include" ]; then | ||
46 | archincludedir="$archincludedir $include" | ||
47 | find $include $ignore -name "$2" -print; | ||
48 | fi | ||
42 | } | 49 | } |
43 | 50 | ||
44 | # find sources in include/ | 51 | # find sources in include/ |
@@ -63,14 +70,15 @@ find_sources() | |||
63 | 70 | ||
64 | all_sources() | 71 | all_sources() |
65 | { | 72 | { |
66 | for arch in $ALLSOURCE_ARCHS | 73 | find_arch_include_sources ${ARCH} '*.[chS]' |
67 | do | ||
68 | find_sources $arch '*.[chS]' | ||
69 | done | ||
70 | if [ ! -z "$archinclude" ]; then | 74 | if [ ! -z "$archinclude" ]; then |
71 | find_arch_include_sources $archinclude '*.[chS]' | 75 | find_arch_include_sources $archinclude '*.[chS]' |
72 | fi | 76 | fi |
73 | find_include_sources '*.[chS]' | 77 | find_include_sources '*.[chS]' |
78 | for arch in $ALLSOURCE_ARCHS | ||
79 | do | ||
80 | find_sources $arch '*.[chS]' | ||
81 | done | ||
74 | find_other_sources '*.[chS]' | 82 | find_other_sources '*.[chS]' |
75 | } | 83 | } |
76 | 84 | ||