Jaroslav Kysela wrote:
Stephen Warren wrote:
Jaroslav Kysela wrote:
Stephen Warren wrote:
Unfortunately, it doesn't seem to work:
ALSAKERNELDIR=../sound-2.6/sound ./gitcompile
It should be:
ALSAKERNELDIR=../sound-2.6 ./gitcompile
sound-2.6 is a complete Linux kernel tree, not just the ALSA drivers. Hence, the second part of the following test fails, because last.c is in ../sound-2.6/sound/last.c not ../sound-2.6/last.c
if [ ! -d $ALSAKERNELDIR -o ! -f $ALSAKERNELDIR/last.c ]; then echo "No alsa-kmirror is found."
You're right. But the Makefile accepts both trees. This patch should solve this issue:
OK, that patch works OK, but I actually ended up getting the exact same issue.
make[3]: Warning: File `.includes' has modification time 0.04 s in the future cp ../../alsa-kernel/include/*.h . cp: cannot stat `../../alsa-kernel/include/*.h': No such file or directory
I looked into that further this time, and I found it's because alsa-driver-build/alsa-kernel/include points at ../sound-2.6/include/sound, but should have an extra "../" on the front. Doing the following fixes this:
ALSAKERNELDIR=`cd ../sound-2.6 && pwd` ./gitcompile
Doesn't this affect the ../alsa-kmirror case too? Perhaps everyone who checks out alsa-kmirror places it inside the alsa-driver-build directory, or symlinks it themselves first?
Perhaps gitcompile can add the following right before the make:
ALSAKERNELDIR=`cd ${ALSAKERNELDIR} && pwd`
But I'm not familiar enough with all configurations people use this in to know whether that would break anything.
If that's OK, the final patch might be as below; it Works For Me.
diff --git a/gitcompile b/gitcompile index b845fd8..57e56e2 100755 --- a/gitcompile +++ b/gitcompile @@ -28,18 +28,22 @@ fi #fi
# check for alsa-kmirror directory -if [ -d alsa-kernel -a -f alsa-kernel/last.c ]; then +if [ -d alsa-kernel -a -f alsa-kernel/sound/last.c ]; then ALSAKERNELDIR="alsa-kernel" elif [ -d alsa-kmirror -a -f alsa-kmirror/last.c ]; then ALSAKERNELDIR="alsa-kmirror" else - test -z $ALSAKERNELDIR && ALSAKERNELDIR=../alsa-kmirror - if [ ! -d $ALSAKERNELDIR -o ! -f $ALSAKERNELDIR/last.c ]; then - echo "No alsa-kmirror is found." - echo "Please specify the correct location via ALSAKERNELDIR environment variable." - exit 1 + test -z $ALSAKERNELDIR && [ -d ../alsa-kmirror ] && ALSAKERNELDIR=../alsa-kmirror + test -z $ALSAKERNELDIR && [ -d ../sound-2.6 ] && ALSAKERNELDIR=../sound-2.6 + if [ ! -d "$ALSAKERNELDIR" -o ! -f "$ALSAKERNELDIR/last.c" ]; then + if [ ! -f "$ALSAKERNELDIR/sound/last.c" ]; then + echo "No alsa-kmirror or alsa-kernel tree is found." + echo "Please specify the correct location via ALSAKERNELDIR environment variable." + exit 1 + fi fi fi +ALSAKERNELDIR=`cd ${ALSAKERNELDIR} && pwd` make ALSAKERNELDIR="$ALSAKERNELDIR" all-deps || exit 1 aclocal $ACLOCAL_FLAGS || exit 1 autoconf || exit 1