public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] makesystem: revive cscope target
Date: Sun, 14 Dec 2008 00:13:59 +0100	[thread overview]
Message-ID: <20081213231359.GA32331@uranus.ravnborg.org> (raw)
In-Reply-To: <1228911013-25641-1-git-send-email-jirislaby@gmail.com>

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


      parent reply	other threads:[~2008-12-13 23:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-10 12:10 [PATCH 1/1] makesystem: revive cscope target Jiri Slaby
2008-12-10 12:41 ` Sam Ravnborg
2008-12-10 12:46   ` Jiri Slaby
2008-12-10 13:00     ` Sam Ravnborg
2008-12-10 12:59       ` Jiri Slaby
2008-12-13 23:13 ` Sam Ravnborg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081213231359.GA32331@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=jirislaby@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox