From be8a79a8bf4ec4ee6d66e13dd577386f1f5f8106 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Thu, 28 Nov 2002 19:00:25 +0000 Subject: [PATCH] Handle the case where /lib/modules/$KERNELVERSION/build doesn't exist. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1654 7894878c-1315-0410-8ee3-d5d059ff63e0 --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 06fa51d9..2604b675 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,9 @@ KERNELVERSION := $(shell uname -r) # The location of linux itself. This is used to find the kernel headers # and other things. #LINUX := /usr/src/linux -LINUX := /lib/modules/$(KERNELVERSION)/build +LINUX := $(shell if [ -L /lib/modules/$(KERNELVERSION)/build ] ; \ + then echo "/lib/modules/$(KERNELVERSION)/build" ; \ + else echo "/usr/src/linux" ; fi) LINUX_HEADERS := $(LINUX)/include # Determine whether we need to compile the kernel modules, or only the