Hello,

The following patch fix issue when compiling open-vm-tools configured with --with-linuxdir= Current version required to prepare valid link /lib/modules/$(uname -r)/build and kernel , pointed to kernel sources. - what is not valid solution and is not always possible. It was especially annoying for crosscompilation.
Attached patch is fixing this problem.

regards,
Wojtek Sawaƛciuk

diff -Naur open-vm-tools-2010.12.19-339835/modules/linux/vmblock/Makefile open-vm-tools-2010.12.19-339835-ok/modules/linux/vmblock/Makefile
--- open-vm-tools-2010.12.19-339835/modules/linux/vmblock/Makefile	2010-12-20 22:33:11.000000000 +0000
+++ open-vm-tools-2010.12.19-339835-ok/modules/linux/vmblock/Makefile	2011-02-01 16:43:44.853831913 +0000
@@ -46,7 +46,7 @@
 VM_UNAME = $(shell uname -r)
 
 # Header directory for the running kernel
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
+HEADER_DIR = $(LINUXDIR)/include
 
 BUILD_DIR = $(HEADER_DIR)/..
 
diff -Naur open-vm-tools-2010.12.19-339835/modules/linux/vmci/Makefile open-vm-tools-2010.12.19-339835-ok/modules/linux/vmci/Makefile
--- open-vm-tools-2010.12.19-339835/modules/linux/vmci/Makefile	2010-12-20 22:33:11.000000000 +0000
+++ open-vm-tools-2010.12.19-339835-ok/modules/linux/vmci/Makefile	2011-02-01 16:43:03.177830065 +0000
@@ -46,7 +46,7 @@
 VM_UNAME = $(shell uname -r)
 
 # Header directory for the running kernel
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
+HEADER_DIR = $(LINUXDIR)/include
 
 BUILD_DIR = $(HEADER_DIR)/..
 
diff -Naur open-vm-tools-2010.12.19-339835/modules/linux/vmhgfs/Makefile open-vm-tools-2010.12.19-339835-ok/modules/linux/vmhgfs/Makefile
--- open-vm-tools-2010.12.19-339835/modules/linux/vmhgfs/Makefile	2010-12-20 22:33:11.000000000 +0000
+++ open-vm-tools-2010.12.19-339835-ok/modules/linux/vmhgfs/Makefile	2011-02-01 16:42:21.501828595 +0000
@@ -46,7 +46,7 @@
 VM_UNAME = $(shell uname -r)
 
 # Header directory for the running kernel
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
+HEADER_DIR = $(LINUXDIR)/include
 
 BUILD_DIR = $(HEADER_DIR)/..
 
diff -Naur open-vm-tools-2010.12.19-339835/modules/linux/vmsync/Makefile open-vm-tools-2010.12.19-339835-ok/modules/linux/vmsync/Makefile
--- open-vm-tools-2010.12.19-339835/modules/linux/vmsync/Makefile	2010-12-20 22:33:11.000000000 +0000
+++ open-vm-tools-2010.12.19-339835-ok/modules/linux/vmsync/Makefile	2011-02-01 16:41:06.165831823 +0000
@@ -46,7 +46,7 @@
 VM_UNAME = $(shell uname -r)
 
 # Header directory for the running kernel
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
+HEADER_DIR = $(LINUXDIR)/include
 
 BUILD_DIR = $(HEADER_DIR)/..
 
diff -Naur open-vm-tools-2010.12.19-339835/modules/linux/vmxnet/Makefile open-vm-tools-2010.12.19-339835-ok/modules/linux/vmxnet/Makefile
--- open-vm-tools-2010.12.19-339835/modules/linux/vmxnet/Makefile	2010-12-20 22:33:11.000000000 +0000
+++ open-vm-tools-2010.12.19-339835-ok/modules/linux/vmxnet/Makefile	2011-02-01 16:42:01.781830507 +0000
@@ -46,7 +46,7 @@
 VM_UNAME = $(shell uname -r)
 
 # Header directory for the running kernel
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
+HEADER_DIR = $(LINUXDIR)/include
 
 BUILD_DIR = $(HEADER_DIR)/..
 
diff -Naur open-vm-tools-2010.12.19-339835/modules/linux/vsock/Makefile open-vm-tools-2010.12.19-339835-ok/modules/linux/vsock/Makefile
--- open-vm-tools-2010.12.19-339835/modules/linux/vsock/Makefile	2010-12-20 22:33:11.000000000 +0000
+++ open-vm-tools-2010.12.19-339835-ok/modules/linux/vsock/Makefile	2011-02-01 16:43:27.785829230 +0000
@@ -46,7 +46,7 @@
 VM_UNAME = $(shell uname -r)
 
 # Header directory for the running kernel
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
+HEADER_DIR = $(LINUXDIR)/include
 
 BUILD_DIR = $(HEADER_DIR)/..
 
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
open-vm-tools-devel mailing list
open-vm-tools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-vm-tools-devel

Reply via email to