From: VMware, Inc <> Date: Thu, 24 Feb 2011 22:57:32 +0000 (-0800) Subject: open-vm-tools: propagate --with-linuxdir value to makefiles. X-Git-Tag: 2011.02.23-368700~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b35b35643299a9f62bb57290585ecb27d98ba1bb;p=thirdparty%2Fopen-vm-tools.git open-vm-tools: propagate --with-linuxdir value to makefiles. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac index 905fcc435..ac9de9895 100644 --- a/open-vm-tools/configure.ac +++ b/open-vm-tools/configure.ac @@ -148,6 +148,10 @@ if test "$with_kernel_modules" = "yes"; then if test ! -d "$LINUXDIR/kernel/"; then AC_MSG_ERROR([$LINUXDIR/kernel does not exist]) fi + LINUXINCLUDE="$LINUXDIR/build/include" + if test ! -d "$LINUXINCLUDE"; then + AC_MSG_ERROR([Can't find include dir under $LINUXDIR]) + fi ;; freebsd) @@ -1131,6 +1135,7 @@ AC_SUBST([HGFS_LIBS]) AC_SUBST([TOOLS_VERSION]) AC_SUBST([TARGET_OS]) AC_SUBST([KERNEL_RELEASE]) +AC_SUBST([LINUXINCLUDE]) AC_SUBST([MODULES_OS]) AC_SUBST([MODULES_DIR]) AC_SUBST([MODULES]) diff --git a/open-vm-tools/modules/Makefile.am b/open-vm-tools/modules/Makefile.am index c1e92b950..f87f26e24 100644 --- a/open-vm-tools/modules/Makefile.am +++ b/open-vm-tools/modules/Makefile.am @@ -17,6 +17,7 @@ EXTRA_ARGS += "SYSDIR=@SYSDIR@" endif if LINUX +export LINUXINCLUDE := @LINUXINCLUDE@ export vmblockdir := $(MODULES_DIR)/fs/vmblock export vmcidir := $(MODULES_DIR)/drivers/misc export vmhgfsdir := $(MODULES_DIR)/fs/vmhgfs diff --git a/open-vm-tools/modules/linux/vmblock/Makefile b/open-vm-tools/modules/linux/vmblock/Makefile index 50349778a..b2328b767 100644 --- a/open-vm-tools/modules/linux/vmblock/Makefile +++ b/open-vm-tools/modules/linux/vmblock/Makefile @@ -46,7 +46,11 @@ endif VM_UNAME = $(shell uname -r) # Header directory for the running kernel +ifdef LINUXINCLUDE +HEADER_DIR = $(LINUXINCLUDE) +else HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include +endif BUILD_DIR = $(HEADER_DIR)/.. diff --git a/open-vm-tools/modules/linux/vmci/Makefile b/open-vm-tools/modules/linux/vmci/Makefile index 5619c48a7..3e14ea469 100644 --- a/open-vm-tools/modules/linux/vmci/Makefile +++ b/open-vm-tools/modules/linux/vmci/Makefile @@ -46,7 +46,11 @@ endif VM_UNAME = $(shell uname -r) # Header directory for the running kernel +ifdef LINUXINCLUDE +HEADER_DIR = $(LINUXINCLUDE) +else HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include +endif BUILD_DIR = $(HEADER_DIR)/.. diff --git a/open-vm-tools/modules/linux/vmhgfs/Makefile b/open-vm-tools/modules/linux/vmhgfs/Makefile index c4ec0f67f..350eb90c1 100644 --- a/open-vm-tools/modules/linux/vmhgfs/Makefile +++ b/open-vm-tools/modules/linux/vmhgfs/Makefile @@ -46,7 +46,11 @@ endif VM_UNAME = $(shell uname -r) # Header directory for the running kernel +ifdef LINUXINCLUDE +HEADER_DIR = $(LINUXINCLUDE) +else HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include +endif BUILD_DIR = $(HEADER_DIR)/.. diff --git a/open-vm-tools/modules/linux/vmsync/Makefile b/open-vm-tools/modules/linux/vmsync/Makefile index cf1e6392b..e65e95d8a 100644 --- a/open-vm-tools/modules/linux/vmsync/Makefile +++ b/open-vm-tools/modules/linux/vmsync/Makefile @@ -46,7 +46,11 @@ endif VM_UNAME = $(shell uname -r) # Header directory for the running kernel +ifdef LINUXINCLUDE +HEADER_DIR = $(LINUXINCLUDE) +else HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include +endif BUILD_DIR = $(HEADER_DIR)/.. diff --git a/open-vm-tools/modules/linux/vmxnet/Makefile b/open-vm-tools/modules/linux/vmxnet/Makefile index 33e94d0f8..aabcdd8f9 100644 --- a/open-vm-tools/modules/linux/vmxnet/Makefile +++ b/open-vm-tools/modules/linux/vmxnet/Makefile @@ -46,7 +46,11 @@ endif VM_UNAME = $(shell uname -r) # Header directory for the running kernel +ifdef LINUXINCLUDE +HEADER_DIR = $(LINUXINCLUDE) +else HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include +endif BUILD_DIR = $(HEADER_DIR)/.. diff --git a/open-vm-tools/modules/linux/vsock/Makefile b/open-vm-tools/modules/linux/vsock/Makefile index d700d8807..ccde6f24e 100644 --- a/open-vm-tools/modules/linux/vsock/Makefile +++ b/open-vm-tools/modules/linux/vsock/Makefile @@ -46,7 +46,11 @@ endif VM_UNAME = $(shell uname -r) # Header directory for the running kernel +ifdef LINUXINCLUDE +HEADER_DIR = $(LINUXINCLUDE) +else HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include +endif BUILD_DIR = $(HEADER_DIR)/..