Bug#269893: dvb-driver does not compile due to wrong Makefile

Regnat Nikolaus pkg-vdr-dvb-devel@lists.alioth.debian.org
Sat, 4 Sep 2004 09:31:38 +0200

Package: dvb-driver-source
Version: 1.1.1-2
Severity: Important

Trying to build the dvb-driver-source for my custom kernel did not work. 
make-kpkg modules_image told:

cd build-2.4 && [ -L saa7146_video.c ] || ./getlinks
cat: CVS/Root: No such file or directory
make[2]: Entering directory `/usr/src/modules/dvb-driver'
/usr/bin/make -C /usr/src/modules/dvb-driver/build-2.4
make[3]: Entering directory `/usr/src/modules/dvb-driver/build-2.4'
cc -D__KERNEL__ -I/home/regnat/kernel/epia/linux-2.4.26include -Wall 
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common 
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i386 -DMODULE 
-include /home/regnat/kernel/epia/linux-2.4.26include/linux/modversions.h -MD 
-I ../linux/include -I ./include -I. -DCONFIG_DVB_AV7110_OSD -nostdinc 
-iwithprefix include -DEXPORT_SYMTAB -c video-buf.c
line>:138473950:61984: /home/regnat/kernel/epia/linux-2.4.26include/linux/modversions.h: 
No such file or directory
video-buf.c:19:24: linux/init.h: No such file or directory
video-buf.c:20:26: linux/module.h: No such file or directory
video-buf.c:21:27: linux/vmalloc.h: No such file or directory

Seeing the line 
-include /home/regnat/kernel/epia/linux-2.4.26include/linux/modversions.h
showed me there's a problem (missing slash /)

Therefore I added the / after both (KSRC) statements (within 

export KCFLAGS= -D__KERNEL__ -I$(KSRC)/include -Wall -Wstrict-prototypes 
-Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer 
-pipe -mpreferred-stack-boundary=2 -march=i386 -DMODULE -DMODVERSIONS 
-include $(KSRC)/include/linux/modversions.h -MD -I ../linux/include 
-I ./include -I. -DCONFIG_DVB_AV7110_OSD -nostdinc -iwithprefix include 

After that everything worked as expected, the module compiled fine.