Index: /trunk/src/VBox/Additions/linux/Makefile
===================================================================
--- /trunk/src/VBox/Additions/linux/Makefile	(revision 78445)
+++ /trunk/src/VBox/Additions/linux/Makefile	(revision 78446)
@@ -15,12 +15,12 @@
 #
 
-ifneq ($(KBUILD_EXTMOD),)
+ifneq ($(KERNELRELEASE),)
 
-# Building from kBuild (make -C <kernel_directory> M=`pwd`).
-# KBUILD_EXTMOD is set to $(M) in this case.
+# Building from kBuild (make -C <kernel_directory> M=`pwd`)
+# or inside a kernel source tree.
 
 obj-m = vboxguest/ vboxsf/ vboxvideo/
 
-else # ! KBUILD_EXTMOD
+else # ! KERNELRELEASE
 
 KBUILD_VERBOSE =
@@ -108,3 +108,3 @@
 .PHONY: vboxguest vboxsf vboxvideo all install clean check load
 
-endif # ! KBUILD_EXTMOD
+endif # ! KERNELRELEASE
Index: /trunk/src/VBox/HostDrivers/linux/Makefile
===================================================================
--- /trunk/src/VBox/HostDrivers/linux/Makefile	(revision 78445)
+++ /trunk/src/VBox/HostDrivers/linux/Makefile	(revision 78446)
@@ -24,23 +24,23 @@
 #
 
-ifneq ($(KBUILD_EXTMOD),)
+ifneq ($(KERNELRELEASE),)
 
-# Building from kBuild (make -C <kernel_directory> M=`pwd`).
-# KBUILD_EXTMOD is set to $(M) in this case.
+# Building from kBuild (make -C <kernel_directory> M=`pwd`),
+# or inside a kernel source tree.
 
 obj-m = vboxdrv/
-ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxnetflt/Makefile),)
+ifneq ($(wildcard $(CURDIR)/vboxnetflt/Makefile),)
  obj-m += vboxnetflt/
 endif
-ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxnetadp/Makefile),)
+ifneq ($(wildcard $(CURDIR)/vboxnetadp/Makefile),)
  obj-m += vboxnetadp/
 endif
-ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxpci/Makefile),)
+ifneq ($(wildcard $(CURDIR)/vboxpci/Makefile),)
  obj-m += vboxpci/
 endif
 
-else # ! KBUILD_EXTMOD
+else # ! KERNELRELEASE
 
-# convenience Makefile without KBUILD_EXTMOD
+# convenience Makefile without KERNELRELEASE
 
 KBUILD_VERBOSE ?=
@@ -147,3 +147,3 @@
 	done
 
-endif # ! KBUILD_EXTMOD
+endif # ! KERNELRELEASE
Index: /trunk/src/VBox/Installer/linux/Makefile-header.gmk
===================================================================
--- /trunk/src/VBox/Installer/linux/Makefile-header.gmk	(revision 78445)
+++ /trunk/src/VBox/Installer/linux/Makefile-header.gmk	(revision 78446)
@@ -188,18 +188,4 @@
 INSTALL_MOD_DIR ?= misc
 MODULE_DIR := $(INSTALL_MOD_PATH)/lib/modules/$(KERN_VER)/$(INSTALL_MOD_DIR)
-
-#
-# The KBUILD_EXTMOD variable is used by 2.6.6 and later when build external
-# modules (see https://lwn.net/Articles/79984/).  It will be set to SUBDIRS
-# or M by the linux kernel makefile.  We fake it here for older kernels.
-#
-## @todo Drop this KBUILD_EXTMOD glue once it has been removed from all our makefiles (see sharedfolders).
-ifndef CURDIR # for make < v3.79
- CURDIR := $(shell pwd)
-endif
-ifndef KBUILD_EXTMOD
- KBUILD_EXTMOD := $(CURDIR)
-endif
-
 
 # For VBOX_GCC_CHECK_CC
@@ -240,5 +226,4 @@
 $(warning dbg: KERN_VERSION     = $(KERN_VERSION))
 $(warning dbg: MODULE_DIR       = $(MODULE_DIR))
-$(warning dbg: KBUILD_EXTMOD    = $(KBUILD_EXTMOD))
 $(warning dbg: VBOX_MODULE_SRC_DIR = $(VBOX_MODULE_SRC_DIR))
  endif
