diff options
-rwxr-xr-x | v4l/scripts/makelinks.sh | 45 |
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 |