lkml.org 
[lkml]   [2008]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 1/1] makesystem: revive cscope target
On Wed, Dec 10, 2008 at 01:10:13PM +0100, Jiri Slaby wrote:
> - export src and obj, so that we can check them in tags.sh
> - don't allow * expansion during sh function calls
>
> Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
> Cc: Sam Ravnborg <sam@ravnborg.org>

I have applied a slightly modifed version.
See below.

Sam

From 6d97189e6862970911ec74cfeaadc3d9ed3e295a Mon Sep 17 00:00:00 2001
From: Jiri Slaby <jirislaby@gmail.com>
Date: Wed, 10 Dec 2008 13:10:13 +0100
Subject: [PATCH] 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>
---
scripts/tags.sh | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/scripts/tags.sh b/scripts/tags.sh
index 47274dc..3c814ba 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()
--
1.5.6.GIT


\
 
 \ /
  Last update: 2008-12-14 00:15    [W:4.114 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site