makesystem: revive cscope target
PATCH 1/1 makesystem: revive cscope target
- export src and obj, so that we can check them in tags.sh
- don't allow * expansion during sh function calls
--- Makefile | 2 +- scripts/tags.sh | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-)
Makefile +1 -1
@@ -156,7 +156,7 @@ obj := $(objtree) VPATH := $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD)) -export srctree objtree VPATH TOPDIR +export src obj srctree objtree VPATH TOPDIR # SUBARCH tells the usermode build what the underlying arch is. That is set
scripts/tags.sh +11 -11
@@ -21,25 +21,25 @@ ignore="( -name SCCS -o -name BitKeeper -o -name .svn -o \ if [ ${src} == ${obj} ]; 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()
Signature · 1 line
1.6.0.5
Quoted 2 lines · Jiri Slaby
- export src and obj, so that we can check them in
tags.sh
- don't allow * expansion during sh function calls
What benefit does this patch give us?
We do not use $obj neither $src in tags.sh.
Likewise we do not pass it non-expanded parameters.
Sam
Quoted 6 lines · Sam Ravnborg
Quoted 2 lines · Jiri Slaby
- export src and obj, so that we can check them in
tags.sh
- don't allow * expansion during sh function callsWhat benefit does this patch give us?
We do not use $obj neither $src intags.sh.
I'm confused...
git kernel.org:/pub/scm/linux/kernel/git/sam/kbuild-next.git says:
# Do not use full path is we do not use O=.. builds if [ ${src} == ${obj} ]; then
tree=
else
tree=${srctree}fi
in scripts/tags.sh.
Quoted 1 line
Likewise we do not pass it non-expanded parameters.
We do inside the script. Try to touch XYZ.S in your build tree, the tags.sh won't work then.
Quoted 16 lines · Jiri Slaby
Quoted 6 lines · Sam Ravnborg
Quoted 2 lines · Jiri Slaby
- export src and obj, so that we can check them in
tags.sh
- don't allow * expansion during sh function callsWhat benefit does this patch give us?
We do not use $obj neither $src intags.sh.I'm confused...
git kernel.org:/pub/scm/linux/kernel/git/sam/kbuild-next.git says:
# Do not use full path is we do not use O=.. builds if [ ${src} == ${obj} ]; then
tree=
else
Quoted 3 lines
tree=${srctree}fi
inscripts/tags.sh.
OK - forgot about that one.
Will apply your patches when I get at my Linux box.
Sam
Quoted 2 lines · Sam Ravnborg
OK - forgot about that one.
Will apply your patches when I get at my Linux box.
Ok, thanks.
Quoted 5 lines · Jiri Slaby
- export src and obj, so that we can check them in
tags.sh
- don't allow * expansion during sh function callsSigned-off-by Jiri Slaby <[email protected]>Cc Sam Ravnborg <[email protected]>
I have applied a slightly modifed version.
See below.
Sam
From 6d97189e6862970911ec74cfeaadc3d9ed3e295a Mon Sep 17 00:00:00 2001
From: Jiri Slaby <[email protected]>
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
--- scripts/tags.sh | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-)
scripts/tags.sh +12 -12
@@ -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()
Signature · 1 line
1.5.6.GIT