diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2008-12-10 07:10:13 -0500 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2008-12-13 18:15:09 -0500 |
commit | 709cc372cad628846d73447edfd95ac39c8e2319 (patch) | |
tree | 0d240bf65b7b82d68d1c54c4980e69797c902f7f /scripts | |
parent | 31110ebbec8688c6e9597b641101afc94e1c762a (diff) |
kbuild: fix make tags/cscope
- fix combining O=... and tags
- don't allow * expansion during sh function calls
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
[sam: use KBUILD_SRC to check if we use O=...]
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/tags.sh | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/scripts/tags.sh b/scripts/tags.sh index 47274dc5d823..3c814ba0fa85 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh | |||
@@ -18,28 +18,28 @@ ignore="( -name SCCS -o -name BitKeeper -o -name .svn -o \ | |||
18 | -prune -o" | 18 | -prune -o" |
19 | 19 | ||
20 | # Do not use full path is we do not use O=.. builds | 20 | # Do not use full path is we do not use O=.. builds |
21 | if [ ${src} == ${obj} ]; then | 21 | if [ "${KBUILD_SRC}" == "" ]; then |
22 | tree= | 22 | tree= |
23 | else | 23 | else |
24 | tree=${srctree} | 24 | tree=${srctree}/ |
25 | fi | 25 | fi |
26 | 26 | ||
27 | # find sources in arch/$ARCH | 27 | # find sources in arch/$ARCH |
28 | find_arch_sources() | 28 | find_arch_sources() |
29 | { | 29 | { |
30 | find ${tree}arch/$1 $ignore -name $2 -print; | 30 | find ${tree}arch/$1 $ignore -name "$2" -print; |
31 | } | 31 | } |
32 | 32 | ||
33 | # find sources in arch/$1/include | 33 | # find sources in arch/$1/include |
34 | find_arch_include_sources() | 34 | find_arch_include_sources() |
35 | { | 35 | { |
36 | find ${tree}arch/$1/include $ignore -name $2 -print; | 36 | find ${tree}arch/$1/include $ignore -name "$2" -print; |
37 | } | 37 | } |
38 | 38 | ||
39 | # find sources in include/ | 39 | # find sources in include/ |
40 | find_include_sources() | 40 | find_include_sources() |
41 | { | 41 | { |
42 | find ${tree}include $ignore -name config -prune -o -name $1 -print; | 42 | find ${tree}include $ignore -name config -prune -o -name "$1" -print; |
43 | } | 43 | } |
44 | 44 | ||
45 | # find sources in rest of tree | 45 | # find sources in rest of tree |
@@ -48,27 +48,27 @@ find_other_sources() | |||
48 | { | 48 | { |
49 | find ${tree}* $ignore \ | 49 | find ${tree}* $ignore \ |
50 | \( -name include -o -name arch -o -name '.tmp_*' \) -prune -o \ | 50 | \( -name include -o -name arch -o -name '.tmp_*' \) -prune -o \ |
51 | -name $1 -print; | 51 | -name "$1" -print; |
52 | } | 52 | } |
53 | 53 | ||
54 | find_sources() | 54 | find_sources() |
55 | { | 55 | { |
56 | find_arch_sources $1 $2 | 56 | find_arch_sources $1 "$2" |
57 | find_include_sources $2 | 57 | find_include_sources "$2" |
58 | find_other_sources $2 | 58 | find_other_sources "$2" |
59 | } | 59 | } |
60 | 60 | ||
61 | all_sources() | 61 | all_sources() |
62 | { | 62 | { |
63 | find_sources $SRCARCH *.[chS] | 63 | find_sources $SRCARCH '*.[chS]' |
64 | if [ ! -z "$archinclude" ]; then | 64 | if [ ! -z "$archinclude" ]; then |
65 | find_arch_include_sources $archinclude *.[chS] | 65 | find_arch_include_sources $archinclude '*.[chS]' |
66 | fi | 66 | fi |
67 | } | 67 | } |
68 | 68 | ||
69 | all_kconfigs() | 69 | all_kconfigs() |
70 | { | 70 | { |
71 | find_sources $SRCARCH "Kconfig*" | 71 | find_sources $SRCARCH 'Kconfig*' |
72 | } | 72 | } |
73 | 73 | ||
74 | all_defconfigs() | 74 | all_defconfigs() |