diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2008-12-10 15:10:13 +0300 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2008-12-14 02:15:09 +0300 |
commit | 709cc372cad628846d73447edfd95ac39c8e2319 (patch) | |
tree | 0d240bf65b7b82d68d1c54c4980e69797c902f7f | |
parent | 31110ebbec8688c6e9597b641101afc94e1c762a (diff) | |
download | linux-709cc372cad628846d73447edfd95ac39c8e2319.tar.xz |
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>
-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 \ -prune -o" # Do not use full path is we do not use O=.. builds -if [ ${src} == ${obj} ]; then +if [ "${KBUILD_SRC}" == "" ]; then tree= else - tree=${srctree} + tree=${srctree}/ fi # find sources in arch/$ARCH find_arch_sources() { - find ${tree}arch/$1 $ignore -name $2 -print; + find ${tree}arch/$1 $ignore -name "$2" -print; } # find sources in arch/$1/include find_arch_include_sources() { - find ${tree}arch/$1/include $ignore -name $2 -print; + find ${tree}arch/$1/include $ignore -name "$2" -print; } # find sources in include/ find_include_sources() { - find ${tree}include $ignore -name config -prune -o -name $1 -print; + find ${tree}include $ignore -name config -prune -o -name "$1" -print; } # find sources in rest of tree @@ -48,27 +48,27 @@ find_other_sources() { find ${tree}* $ignore \ \( -name include -o -name arch -o -name '.tmp_*' \) -prune -o \ - -name $1 -print; + -name "$1" -print; } find_sources() { - find_arch_sources $1 $2 - find_include_sources $2 - find_other_sources $2 + find_arch_sources $1 "$2" + find_include_sources "$2" + find_other_sources "$2" } all_sources() { - find_sources $SRCARCH *.[chS] + find_sources $SRCARCH '*.[chS]' if [ ! -z "$archinclude" ]; then - find_arch_include_sources $archinclude *.[chS] + find_arch_include_sources $archinclude '*.[chS]' fi } all_kconfigs() { - find_sources $SRCARCH "Kconfig*" + find_sources $SRCARCH 'Kconfig*' } all_defconfigs() |