[PATCH 4/4] kbuild: Hack for depmod not handling X.Y versions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



depmod checks if the argument starts with <num>.<num>.<num>. Until
depmod is fixed, we cheat with a symlink.

Signed-off-by: Michal Marek <mmarek@xxxxxxx>
---
 Makefile |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 130e282..0d8d05e 100644
--- a/Makefile
+++ b/Makefile
@@ -1533,9 +1533,19 @@ quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN   $(wildcard $(rm-files))
 quiet_cmd_depmod = DEPMOD  $(KERNELRELEASE)
       cmd_depmod = \
 	if [ -r System.map -a -x $(DEPMOD) ]; then                              \
+		if test -z "$(SUBLEVEL)"; then					\
+			version=99.$(KERNELRELEASE);				\
+			ln -s $(KERNELRELEASE) 					\
+				$(INSTALL_MOD_PATH)/lib/modules/$$version;	\
+		else								\
+			version=$(KERNELRELEASE);				\
+		fi;								\
 		$(DEPMOD) -ae -F System.map                                     \
 		$(if $(strip $(INSTALL_MOD_PATH)), -b $(INSTALL_MOD_PATH) )     \
-		$(KERNELRELEASE);                                               \
+		$$version;                                               	\
+		ret=$$?;							\
+		rm -f $(INSTALL_MOD_PATH)/lib/modules/99.$(KERNELRELEASE);	\
+		exit $$ret;							\
 	fi
 
 # Create temporary dir for module support files
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux