kbuild: specify absolute paths for cscope
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 26 Nov 2009 12:34:12 +0000 (13:34 +0100)
committerMichal Marek <mmarek@suse.cz>
Sat, 12 Dec 2009 12:08:16 +0000 (13:08 +0100)
Cscope doesn't hadle relative paths when cscope.out is not in $PWD. Use
absolute paths when generating cscope.files, which seems to be the
recommended way to generate cscope.out, anyway (at least according to
cscope.sf.net). The speed and size differences are minimal, the only
drawback is that the database needs to be regenerated if the source
directory is moved.

[mmarek: fixed for O= builds, modified changelog]

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/tags.sh

index d52f7a01557c1b28cf3155a640c175ce613558aa..1a0c44d7c4a75308ca6addf915a6951cf30a603d 100755 (executable)
@@ -89,7 +89,13 @@ all_defconfigs()
 
 docscope()
 {
-       (echo \-k; echo \-q; all_sources) > cscope.files
+       # 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
        cscope -b -f cscope.out
 }