All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch eb8f844c "kbuild: specify absolute paths for cscope" breaks cscope use on NFS mounted source tree
@ 2010-03-05 10:21 Ian Campbell
  2010-03-07 21:12 ` Michal Marek
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Campbell @ 2010-03-05 10:21 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Daniel Vetter, mmarek

I keep my kernel source tree on a more powerful build box where I run my
builds etc (including "make cscope") but run my editor from my
workstation with an NFS mount to the source. This worked fine for me
using relative paths for cscope. Using absolute paths in cscope breaks
this previously working setup because the root path is not the same on
both systems. I guess this is similar to moving the source tree around.

Without wanting to start a flamewar it really sounds to me like we are
working around a vim (or cscope) bug here, emacs with cscope bindings
works fine in this configuration.

Could we at least have an option to allow both variants to work? Would
setting "make O=$(pwd) cscope" (where pwd is the source tree) not have
provided a workaround for people who needed absolute paths for whatever
reason?

Ian.
-- 
Ian Campbell
Current Noise: Testament - D.N.R. (Do Not Resuscitate)

What do you give a man who has everything?  Penicillin.
		-- Jerry Lester


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Patch eb8f844c "kbuild: specify absolute paths for cscope" breaks cscope use on NFS mounted source tree
  2010-03-05 10:21 Patch eb8f844c "kbuild: specify absolute paths for cscope" breaks cscope use on NFS mounted source tree Ian Campbell
@ 2010-03-07 21:12 ` Michal Marek
  2010-03-07 21:30   ` Daniel Vetter
  0 siblings, 1 reply; 5+ messages in thread
From: Michal Marek @ 2010-03-07 21:12 UTC (permalink / raw)
  To: Ian Campbell, Daniel Vetter; +Cc: linux-kbuild

On 5.3.2010 11:21, Ian Campbell wrote:
> I keep my kernel source tree on a more powerful build box where I run my
> builds etc (including "make cscope") but run my editor from my
> workstation with an NFS mount to the source. This worked fine for me
> using relative paths for cscope. Using absolute paths in cscope breaks
> this previously working setup because the root path is not the same on
> both systems. I guess this is similar to moving the source tree around.

I was aware that moving the source tree around would break the cscope
database. I hoped that nobody would do this on a daily basis, but
nfs-mounting the tree is essentially the same (an makes perfect sense to
do).


> Without wanting to start a flamewar it really sounds to me like we are
> working around a vim (or cscope) bug here, emacs with cscope bindings
> works fine in this configuration.
> 
> Could we at least have an option to allow both variants to work? Would
> setting "make O=$(pwd) cscope" (where pwd is the source tree) not have
> provided a workaround for people who needed absolute paths for whatever
> reason?

Daniel, how do we proceed here? Would
$ make O=. cscope
plus maybe a comment suggesting this, be an acceptable workaround for
your use case (which was running vim from within a subdirectory, IIRC).

Michal

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Patch eb8f844c "kbuild: specify absolute paths for cscope" breaks cscope use on NFS mounted source tree
  2010-03-07 21:12 ` Michal Marek
@ 2010-03-07 21:30   ` Daniel Vetter
  2010-03-08  9:34     ` Ian Campbell
  2010-03-08  9:34     ` [PATCH] Revert "kbuild: specify absolute paths for cscope" Michal Marek
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel Vetter @ 2010-03-07 21:30 UTC (permalink / raw)
  To: Michal Marek; +Cc: Ian Campbell, Daniel Vetter, linux-kbuild

On Sun, Mar 07, 2010 at 10:12:07PM +0100, Michal Marek wrote:
> Daniel, how do we proceed here? Would
> $ make O=. cscope
> plus maybe a comment suggesting this, be an acceptable workaround for
> your use case (which was running vim from within a subdirectory, IIRC).

If this hack bites other people, just revert it and declare vim broken.
$ make O=. cscope
works as a workaround.

Pardon for the fuss, Daniel
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Patch eb8f844c "kbuild: specify absolute paths for cscope" breaks cscope use on NFS mounted source tree
  2010-03-07 21:30   ` Daniel Vetter
@ 2010-03-08  9:34     ` Ian Campbell
  2010-03-08  9:34     ` [PATCH] Revert "kbuild: specify absolute paths for cscope" Michal Marek
  1 sibling, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2010-03-08  9:34 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Michal Marek, Daniel Vetter, linux-kbuild

On Sun, 2010-03-07 at 22:30 +0100, Daniel Vetter wrote:
> On Sun, Mar 07, 2010 at 10:12:07PM +0100, Michal Marek wrote:
> > Daniel, how do we proceed here? Would
> > $ make O=. cscope
> > plus maybe a comment suggesting this, be an acceptable workaround for
> > your use case (which was running vim from within a subdirectory, IIRC).
> 
> If this hack bites other people, just revert it and declare vim broken.
> $ make O=. cscope
> works as a workaround.
> 
> Pardon for the fuss, Daniel

Thanks Daniel, much appreciated.

Ian.

-- 
Ian Campbell

Alea iacta est.
	[The die is cast]
		-- Gaius Julius Caesar


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] Revert "kbuild: specify absolute paths for cscope"
  2010-03-07 21:30   ` Daniel Vetter
  2010-03-08  9:34     ` Ian Campbell
@ 2010-03-08  9:34     ` Michal Marek
  1 sibling, 0 replies; 5+ messages in thread
From: Michal Marek @ 2010-03-08  9:34 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Michal Marek, Ian Campbell, linux-kbuild

This reverts commit eb8f844c0a41c4529a7d06b7801296eca9ae67aa. Ian
Campbell writes:
> I keep my kernel source tree on a more powerful build box where I run my
> builds etc (including "make cscope") but run my editor from my
> workstation with an NFS mount to the source. This worked fine for me
> using relative paths for cscope. Using absolute paths in cscope breaks
> this previously working setup because the root path is not the same on
> both systems. I guess this is similar to moving the source tree around.
>
> Without wanting to start a flamewar it really sounds to me like we are
> working around a vim (or cscope) bug here, emacs with cscope bindings
> works fine in this configuration.

Given that absolute paths can be forced by make O=. cscope, change the
default back to relative paths.

Ian Campbell <ijc@hellion.org.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Michal Marek <mmarek@suse.cz>
---
 scripts/tags.sh |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/scripts/tags.sh b/scripts/tags.sh
index 868b4c8..8509bb5 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -18,6 +18,8 @@ ignore="( -name SCCS -o -name BitKeeper -o -name .svn -o \
           -prune -o"
 
 # Do not use full path if we do not use O=.. builds
+# Use make O=. {tags|cscope}
+# to force full paths for a non-O= build
 if [ "${KBUILD_SRC}" = "" ]; then
 	tree=
 else
@@ -108,13 +110,7 @@ all_defconfigs()
 
 docscope()
 {
-	# always use absolute paths for cscope, as recommended by cscope
-	# upstream
-	case "$tree" in
-		/*) ;;
-		*) tree=$PWD/$tree ;;
-	esac
-	(cd /; echo \-k; echo \-q; all_sources) > cscope.files
+	(echo \-k; echo \-q; all_sources) > cscope.files
 	cscope -b -f cscope.out
 }
 
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-03-08  9:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-05 10:21 Patch eb8f844c "kbuild: specify absolute paths for cscope" breaks cscope use on NFS mounted source tree Ian Campbell
2010-03-07 21:12 ` Michal Marek
2010-03-07 21:30   ` Daniel Vetter
2010-03-08  9:34     ` Ian Campbell
2010-03-08  9:34     ` [PATCH] Revert "kbuild: specify absolute paths for cscope" Michal Marek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.