All of lore.kernel.org
 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 v2 1/5] kbuild: Fix KERNELVERSION for empty SUBLEVEL or PATCHLEVEL
Date: Thu,  9 Jun 2011 16:57:24 +0200	[thread overview]
Message-ID: <1307631448-29848-2-git-send-email-mmarek@suse.cz> (raw)
In-Reply-To: <1307631448-29848-1-git-send-email-mmarek@suse.cz>

Omit the second dot for releases without SUBLEVEL. If PATCHLEVEL is also
empty, only display VERSION.

Signed-off-by: Michal Marek <mmarek@suse.cz>
---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index afb8e0d..4fe9075 100644
--- a/Makefile
+++ b/Makefile
@@ -378,7 +378,7 @@ KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
 
 # Read KERNELRELEASE from include/config/kernel.release (if it exists)
 KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
-KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
+KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
 
 export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
 export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
-- 
1.7.4.2


  reply	other threads:[~2011-06-09 14:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-09 14:57 [PATCH v2 0/5] Fixes for X.Y kernel versions Michal Marek
2011-06-09 14:57 ` Michal Marek [this message]
2011-06-09 14:57 ` [PATCH v2 2/5] kbuild: Fix <linux/version.h> for empty SUBLEVEL or PATCHLEVEL Michal Marek
2011-06-09 14:57 ` [PATCH v2 3/5] kbuild: Move depmod call to a separate script Michal Marek
2011-06-09 14:57 ` [PATCH v2 4/5] kbuild: Hack for depmod not handling X.Y versions Michal Marek
2011-06-09 14:57 ` [PATCH v2 5/5] perf: Use make kernelversion instead of parsing the Makefile Michal Marek

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=1307631448-29848-2-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.