summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2007-06-04 16:18:51 -0700
committerTrent Piepho <xyzzy@speakeasy.org>2007-06-04 16:18:51 -0700
commit4f574fa6fb96098e56b0eac1649eebd186dfd7a4 (patch)
tree51c98cb0d67e6eed7cf2f9aa5d600b66c4aeee39
parentadba0fd6ff159a95c07caddf54e73a84175ec736 (diff)
downloadmediapointer-dvb-s2-4f574fa6fb96098e56b0eac1649eebd186dfd7a4.tar.gz
mediapointer-dvb-s2-4f574fa6fb96098e56b0eac1649eebd186dfd7a4.tar.bz2
build: fix make kernel-links
From: Trent Piepho <xyzzy@speakeasy.org> The out of tree v4l-dvb build system uses slightly different compiler flags than the kernel does. This caused problems when trying to compile the out of tree version of the source symlinked into the kernel tree. The workaround is to have the script that creates the symlinks also create a new file called drivers/media/Kbuild, which the kernel build system will use in preference to divers/media/Makefile. The new Kbuild file exports the necessary EXTRA_CFLAGS to make building work and then includes the real drivers/media/Makefile. The dvb Makefiles were changed in a previous patch from 'EXTRA_CFLAGS=' to 'EXTRA_CFLAGS+=' so they wouldn't replace the new EXTRA_CFLAGS. The symlink creating script is also re-written to make the symlinks faster with less duplication of commands and avoid some unnecessary links. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
-rwxr-xr-xv4l/scripts/makelinks.sh45
1 files changed, 14 insertions, 31 deletions
diff --git a/v4l/scripts/makelinks.sh b/v4l/scripts/makelinks.sh
index 9ee780aba..ee83e33ec 100755
--- a/v4l/scripts/makelinks.sh
+++ b/v4l/scripts/makelinks.sh
@@ -12,39 +12,22 @@ echo "patching $1..."
cd linux
PWD=`pwd`
+FINDDIR="-name CVS -prune -o -type d"
+FINDFILE="-name CVS -prune -o -type f -not -name .cvsignore\
+ -not -name '*.rej' -not -name '*.orig'"
-for x in `find drivers -type d | grep -v CVS` ; do
- mkdir -p -v $1/$x
+for dir in drivers include Documentation; do
+ find $dir $FINDDIR -exec mkdir -p -v $1/{} \;
+ find $dir $FINDFILE -exec ln -f -s $PWD/{} $1/{} \;
done
-for x in `find Documentation -type d | grep -v CVS` ; do
- mkdir -p -v $1/$x
+for dir in drivers/media include; do
+ find $dir $FINDDIR -exec ln -f -s $PWD/../v4l/compat.h $1/{} \; \
+ -exec touch $1/{}/config-compat.h \;
done
-for x in `find include -type d | grep -v CVS` ; do
- mkdir -p -v $1/$x
-done
-
-for x in `find Documentation -type f | grep -v CVS | grep -v .cvsignore` ; do
- ln -f -s $PWD/$x $1/$x
-done
-
-for x in `find drivers -type f | grep -v CVS | grep -v .cvsignore` ; do
- ln -f -s $PWD/$x $1/$x
-done
-
-for x in `find include -type f | grep -v CVS | grep -v .cvsignore` ; do
- ln -f -s $PWD/$x $1/$x
-done
-
-for x in `find include -type d | grep -v CVS` ; do
- ln -f -s $PWD/../v4l/compat.h $1/$x/compat.h
- touch $1/$x/config-compat.h
-done
-
-for x in `find drivers/media -type d | grep -v CVS` ; do
- ln -f -s $PWD/../v4l/compat.h $1/$x/compat.h
- touch $1/$x/config-compat.h
-done
-
-cd ..
+cat > $1/drivers/media/Kbuild <<EOF
+EXTRA_CFLAGS+=-include include/linux/version.h
+export EXTRA_CFLAGS
+include drivers/media/Makefile
+EOF