Skip to content

Commit

Permalink
kbuild: fix make tags/cscope
Browse files Browse the repository at this point in the history
- fix combining O=... and tags
- don't allow * expansion during sh function calls

Signed-off-by: Jiri Slaby <[email protected]>
[sam: use KBUILD_SRC to check if we use O=...]
Signed-off-by: Sam Ravnborg <[email protected]>
  • Loading branch information
jirislaby authored and sravnborg committed Dec 13, 2008
1 parent 31110eb commit 709cc37
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions scripts/tags.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down

0 comments on commit 709cc37

Please sign in to comment.