Index: /i2c/trunk/INSTALL
===================================================================
--- /i2c/trunk/INSTALL	(revision 3528)
+++ /i2c/trunk/INSTALL	(revision 3723)
@@ -80,9 +80,10 @@
 out by itself their settings, but it is possible to overrule them. A list
 is found below. Most important are the variables that determine where
-your kernel is located (LINUX=/usr/src/linux) and where you want to
-install your modules (MODDIR=/lib/modules/KERNELVERSION/misc) and
-header files (LINUX_INCLUDE_DIR=/usr/local/include/linux). You can see
-that the installation locations are choosen in such a way that they
-are separate from the true kernel.
+your kernel is located (LINUX=/lib/modules/KERNELVERSION/build, usually
+links to /usr/src/linux or something similar) and where you want to
+install your modules (MODDIR=/lib/modules/KERNELVERSION) and header files
+(LINUX_INCLUDE_DIR=/usr/local/include/linux). You can see that the
+installation locations are choosen in such a way that they are separate
+from the true kernel.
 
 Compilation is done by `make all'; `make install' installs the package.
@@ -116,5 +117,5 @@
 ==============================================================
 
-BUILD_SYSTEM (both) default: lm_sensors
+BUILD_SYSTEM (both) (default: lm_sensors)
   The build system which is used. lm_sensors corresponds with compilation
   option 1; i2c with compilatin option 2.
@@ -123,7 +124,9 @@
   other shell. There have been conflicting reports on whether this is 
   needed.
-LINUX (both) default: /usr/src/linux
+KERNELVERSION (both)
+  The version of the currently running kernel.
+LINUX (both) (default: /lib/modules/$(KERNELVERSION)/build)
   The location of your kernel tree.
-COMPILE_KERNEL (both) default: 1
+COMPILE_KERNEL (both) (default: 1)
   Determine whether you want to consider the kernel modules for compilation
   at all. By default, compilation option 1 will only compile and install
@@ -144,9 +147,9 @@
   invocation should determine this automatically, so you should not
   have to bother with this.
-MODDIR (both) default: /lib/modules/KERNELVERSION/misc)
+MODDIR (both) (default: /lib/modules/$(KERNELVERSION))
   The location where the kernel modules will be installed. 
-LINUX_INCLUDE_DIR (compilation option 1 only) default: /usr/local/include/linux
-  The location where the i2c header files will be installed
-WARN (compilation option 1 only) default: 0
+LINUX_INCLUDE_DIR (compilation option 1 only) (default: /usr/local/include/linux)
+  The location where the i2c header files will be installed.
+WARN (compilation option 1 only) (default: 0)
   Generate additional compilation warnings; mainly interesting for
   developers.
Index: /i2c/trunk/CHANGES
===================================================================
--- /i2c/trunk/CHANGES	(revision 3722)
+++ /i2c/trunk/CHANGES	(revision 3723)
@@ -18,5 +18,5 @@
 -----------------------------------------------------------------------------
 
-2.6.6 (2002????)
+2.6.6 (20021???)
   i2c-algo-ibm_ocp.[ch], i2c-adap-ibm_ocp.c: Rename i2c_iic_[add,del]_bus to
            i2c_ocp... to avoid duplicate with i2c-algo-ite in kernel
@@ -26,4 +26,5 @@
   i2c-proc.h: Add SENSORS_INSMOD_8; add naming for new dummy adapters
   mkpatch: Fix export-objs
+  Makefile: Take kernel source location from /lib/modules/x.x.x/build
 
 2.6.5 (20020915)
Index: /i2c/trunk/Makefile
===================================================================
--- /i2c/trunk/Makefile	(revision 3626)
+++ /i2c/trunk/Makefile	(revision 3723)
@@ -24,16 +24,21 @@
 # kernel tree for this (and seems to give minor troubles in some cases).
 # Make your choice.
-BUILD_SYSTEM=lm_sensors
-#BUILD_SYSTEM=i2c
+BUILD_SYSTEM := lm_sensors
+#BUILD_SYSTEM := i2c
 
 # If your /bin/sh is not bash, change the below definition so that make can
 # find bash. Or you can hope your sh-like shell understands all scripts.
 # I think so, but I have not tested it.
-# SHELL=/usr/bin/bash
+#SHELL := /usr/bin/bash
+
+# The currently running kernel version. This is used right below to
+# determine where the kernel sources can be found.
+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_HEADERS=$(LINUX)/include
+#LINUX := /usr/src/linux
+LINUX := /lib/modules/$(KERNELVERSION)/build
+LINUX_HEADERS := $(LINUX)/include
 
 # Determine whether we need to compile the kernel modules, or only the
@@ -60,6 +65,7 @@
 # The magic invocation will return something like this:
 #   /lib/modules/2.2.15-ac9/misc
-# MODDIR := /lib/modules/`grep UTS_RELEASE $(LINUX_HEADERS)/linux/version.h|cut -f 2 -d'"'`/misc
-MODPREF := /lib/modules/`grep UTS_RELEASE $(LINUX_HEADERS)/linux/version.h|cut -f 2 -d'"'`
+#MODDIR := /lib/modules/`grep UTS_RELEASE $(LINUX_HEADERS)/linux/version.h|cut -f 2 -d'"'`/misc
+#MODPREF := /lib/modules/`grep UTS_RELEASE $(LINUX_HEADERS)/linux/version.h|cut -f 2 -d'"'`
+MODPREF := /lib/modules/$(KERNELVERSION)
 
 # This is the directory into which the header files will be installed.
