[Lunar-commits] <moonbase> NVIDIA: readlink is fail
Auke Kok
sofar at foo-projects.org
Sun Jun 12 05:53:52 CEST 2011
commit c3e86eaa04d5ba27e48c8c21ba46be775d6cbf6e
Author: Auke Kok <sofar at foo-projects.org>
Date: Sun Jun 12 05:53:52 2011 +0200
NVIDIA: readlink is fail
/usr/src/linux -> /usr/src/linux-2.6.38.1 ? ok, this works
/usr/src/linux -> linux-2.6.38.1 ? build fails -> readlink returns no absolute path
better to use `cd $dir ; pwd -P` as it's guaranteed to work.
Also, just use the kernel.release file where the real version is written into. This will ensure the kernel is actually *built*.
---
x11/NVIDIA/BUILD | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/x11/NVIDIA/BUILD b/x11/NVIDIA/BUILD
index 533ae64..2505a2c 100644
--- a/x11/NVIDIA/BUILD
+++ b/x11/NVIDIA/BUILD
@@ -99,15 +99,15 @@
# We make the kernel modules on our own
cd kernel &&
- sedit "s@\$\(shell uname -r\)@`readlink /usr/src/linux | cut -d- -f2`@" Makefile.* makefile &&
+ sedit "s@\$\(shell uname -r\)@`cat /usr/src/linux/include/config/kernel.release`@" Makefile.* makefile &&
# sedit "s/-O/$CFLAGS/" Makefile.nvidia &&
# NV_VERBOSE=0 EXTRA_CFLAGS=$CFLAGS ARCH=
- make SYSSRC=`readlink /usr/src/linux` module &&
+ make SYSSRC=`cd /usr/src/linux; pwd -P` module &&
rm -f $SOURCE_DIRECTORY/{libGL.so,libGLcore.so.1,libnvidia-tls.so.1} &&
prepare_install &&
- make SYSSRC=`readlink /usr/src/linux` install &&
+ make SYSSRC=`cd /usr/src/linux; pwd -P` install &&
# NV_VERBOSE=0 EXTRA_CFLAGS=$CFLAGS ARCH=
cd .. &&
More information about the Lunar-commits
mailing list