mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 4/4] kbuild: Hack for depmod not handling X.Y versions
Date: Mon, 30 May 2011 16:50:52 +0200	[thread overview]
Message-ID: <1306767052-15593-5-git-send-email-mmarek@suse.cz> (raw)
In-Reply-To: <1306767052-15593-1-git-send-email-mmarek@suse.cz>

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@suse.cz>
---
 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


      parent reply	other threads:[~2011-05-30 14:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-30 14:50 [PATCH 0/4] Fixes for X.Y kernel versions Michal Marek
2011-05-30 14:50 ` [PATCH 1/4] kbuild: Fix KERNELVERSION for X.Y versions Michal Marek
2011-05-30 14:50 ` [PATCH 2/4] kbuild: Fix <linux/version.h> " Michal Marek
2011-05-30 15:08   ` Valdis.Kletnieks
2011-05-31  9:01     ` Michal Marek
2011-05-31  9:07   ` Américo Wang
2011-05-30 14:50 ` [PATCH 3/4] perf: Use make kernelversion instead of parsing the Makefile Michal Marek
2011-05-30 14:50 ` Michal Marek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1306767052-15593-5-git-send-email-mmarek@suse.cz \
    --to=mmarek@suse.cz \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®