Skip to content

Commit eb8f844

Browse files
danvetmichal42
authored andcommitted
kbuild: specify absolute paths for cscope
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>
1 parent 32197c7 commit eb8f844

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎scripts/tags.sh‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,13 @@ all_defconfigs()
8989

9090
docscope()
9191
{
92-
(echo \-k; echo \-q; all_sources) > cscope.files
92+
# always use absolute paths for cscope, as recommended by cscope
93+
# upstream
94+
case "$tree" in
95+
/*) ;;
96+
*) tree=$PWD/$tree ;;
97+
esac
98+
(cd /; echo \-k; echo \-q; all_sources) > cscope.files
9399
cscope -b -f cscope.out
94100
}
95101

0 commit comments

Comments
 (0)