public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>
To: Andreas Schwab <schwab@suse.de>
Cc: Sam Ravnborg <sam@ravnborg.org>,
	Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, Zachary Amsden <zach@vmware.com>,
	Russell King <rmk@arm.linux.org.uk>,
	James Cloos <cloos@jhcloos.com>
Subject: Re: [PATCH] Kbuild fixes
Date: Fri, 2 Dec 2005 08:28:40 +0100	[thread overview]
Message-ID: <20051202072840.GA3063@informatik.uni-freiburg.de> (raw)
In-Reply-To: <jehd9s6azn.fsf@sykes.suse.de>

Hallo Andreas,

Andreas Schwab wrote:
> Sam Ravnborg <sam@ravnborg.org> writes:
> 
> > Author: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>
> >
> >     [PATCH] kbuild: make kernelrelease in unconfigured kernel prints an error
> >     
> >     Do not include .config for target kernelrelease
> 
> This is wrong.  KERNELRELEASE depends on CONFIG_LOCALVERSION, thus you
> need .config.
James Cloos already indicated that on lkml[1].  I prepared a patch but
didn't sent it to lkml.

Maybe you're happy with the following patch, too?  With it .config is
included if it exists and no error occurs if not.

{{{
Include .config for target kernelrelease if it exists

With this fix the value of CONFIG_LOCALVERSION is appended to the output
of `make kernelrelease`.  The git tag is *not* appended (yet) without a
.config.

Signed-off-by: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>

---

 Makefile |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

applies-to: bf816f7c7055127415fc3b718e260855df815d55
02a17e7669dcc6abd51fefc65af2278e95e4855f
diff --git a/Makefile b/Makefile
index e7a0443..77b51b8 100644
--- a/Makefile
+++ b/Makefile
@@ -407,16 +407,23 @@ outputmakefile:
 # Detect when mixed targets is specified, and make a second invocation
 # of make so .config is not included in this case either (for *config).
 
-no-dot-config-targets := clean mrproper distclean \
-			 cscope TAGS tags help %docs check% kernelrelease
+no-dot-config-targets  := clean mrproper distclean \
+			  cscope TAGS tags help %docs check%
+
+opt-dot-config-targets := kernelrelease
 
 config-targets := 0
 mixed-targets  := 0
 dot-config     := 1
+opt-dot-config := 0
 
-ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),)
+ifneq ($(filter $(no-dot-config-targets) $(opt-dot-config-targets), $(MAKECMDGOALS)),)
 	ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),)
 		dot-config := 0
+	else
+		ifeq ($(filter-out $(opt-dot-config-targets), $(MAKECMDGOALS)),)
+			opt-dot-config := 1
+		endif
 	endif
 endif
 
@@ -483,7 +490,11 @@ ifeq ($(dot-config),1)
 # oldconfig if changes are detected.
 -include .config.cmd
 
+ifeq ($(opt-dot-config),1)
+-include .config
+else
 include .config
+endif
 
 # If .config needs to be updated, it will be done via the dependency
 # that autoconf has on .config.
---
0.99.9g
}}}

[1] http://groups.google.com/group/linux.kernel/browse_thread/thread/25b426027bf5fdba/e5931ac731528c1f?q=Cloos&rnum=2#e5931ac731528c1f

-- 
Uwe Zeisberger

http://www.google.com/search?q=sin%28pi%2F2%29

  reply	other threads:[~2005-12-02  7:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-10 21:36 [PATCH] Kbuild fixes Sam Ravnborg
2005-11-10 21:46 ` Linus Torvalds
2005-11-10 22:16   ` Sam Ravnborg
2005-12-01 16:25 ` Andreas Schwab
2005-12-02  7:28   ` Uwe Zeisberger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-08-01  9:40 [PATCH] kbuild fixes Sam Ravnborg

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=20051202072840.GA3063@informatik.uni-freiburg.de \
    --to=zeisberg@informatik.uni-freiburg.de \
    --cc=akpm@osdl.org \
    --cc=cloos@jhcloos.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=sam@ravnborg.org \
    --cc=schwab@suse.de \
    --cc=torvalds@osdl.org \
    --cc=zach@vmware.com \
    /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