kbuild: fix a cscope bug (make cscope segfaults)
authorMattia Dongili <malattia@linux.it>
Sun, 19 Feb 2006 12:50:37 +0000 (13:50 +0100)
committerSam Ravnborg <sam@mars.ravnborg.org>
Sun, 19 Feb 2006 13:27:57 +0000 (14:27 +0100)
Workaround a cscope bug where a trailing ':' in VPATH makes it segfault
and let it build the cross-reference succesfully.

VPATH=/home/mattia/devel/kernel/git/linux-2.6: cscope -b
[1]    17555 segmentation fault VPATH=/home/mattia/devel/kernel/git/linux-2.6: cscope -b

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Makefile

index a55a1e4e6cdaabd50c15c58e820a405be2ce88f8..7a95f4f8ef144559be32c4a7f7e89f7cbb9371f0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -137,7 +137,7 @@ objtree             := $(CURDIR)
 src            := $(srctree)
 obj            := $(objtree)
 
-VPATH          := $(srctree):$(KBUILD_EXTMOD)
+VPATH          := $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD))
 
 export srctree objtree VPATH TOPDIR