public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: asm-offsets.h is generated in the source tree
Date: Sat, 10 Sep 2005 21:08:22 +0200	[thread overview]
Message-ID: <20050910190822.GA31478@mars.ravnborg.org> (raw)
In-Reply-To: <20050911012033.5632152f.sfr@canb.auug.org.au>

On Sun, Sep 11, 2005 at 01:20:33AM +1000, Stephen Rothwell wrote:
> The latest Linus-git tree generates asm-offsets.h in the source tree even
> if you use O=... I don't know how to fix this, but it means that the
> source tree cannot be read only.

Fixed - patch appended.
[I also made an unrelated space fix in the same patch]

	Sam

kbuild: fix generic asm-offsets.h support

iThis fixes a bug where the generated asm-offsets.h file was saved in
the source tree even with make O=.
Thanks to Stephen Rothwell <sfr@canb.auug.org.au> for the report.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

---
commit 8d36a62364b6b04dc7b0e9fe09f6968f4e5a1f0a
tree 10d5400d627236f7308f13238fa6559ccd9d79d1
parent 0a504f259c90fb41d3495d490fc9dbe2530c8749
author Sam Ravnborg <sam@mars.ravnborg.org> Sat, 10 Sep 2005 21:05:36 +0200
committer Sam Ravnborg <sam@mars.ravnborg.org> Sat, 10 Sep 2005 21:05:36 +0200

 Kbuild   |    5 +++--
 Makefile |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Kbuild b/Kbuild
--- a/Kbuild
+++ b/Kbuild
@@ -4,7 +4,7 @@
 # 1) Generate asm-offsets.h
 
 #####
-# 1) Generate asm-offsets.h 
+# 1) Generate asm-offsets.h
 #
 
 offsets-file := include/asm-$(ARCH)/asm-offsets.h
@@ -22,6 +22,7 @@ sed-$(CONFIG_MIPS) := "/^@@@/s///p"
 
 quiet_cmd_offsets = GEN     $@
 define cmd_offsets
+	mkdir -p $(dir $@); \
 	cat $< | \
 	(set -e; \
 	 echo "#ifndef __ASM_OFFSETS_H__"; \
@@ -43,6 +44,6 @@ arch/$(ARCH)/kernel/asm-offsets.s: arch/
 	$(Q)mkdir -p $(dir $@)
 	$(call if_changed_dep,cc_s_c)
 
-$(srctree)/$(offsets-file): arch/$(ARCH)/kernel/asm-offsets.s Kbuild
+$(obj)/$(offsets-file): arch/$(ARCH)/kernel/asm-offsets.s Kbuild
 	$(call cmd,offsets)
 
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -814,7 +814,7 @@ ifneq ($(KBUILD_MODULES),)
 endif
 
 prepare0: prepare prepare1 FORCE
-	$(Q)$(MAKE) $(build)=$(srctree)
+	$(Q)$(MAKE) $(build)=.
 
 # All the preparing..
 prepare-all: prepare0

      parent reply	other threads:[~2005-09-10 19:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-10 15:20 asm-offsets.h is generated in the source tree Stephen Rothwell
2005-09-10 16:19 ` Sam Ravnborg
2005-09-11  2:32   ` Al Viro
2005-09-11  8:31     ` Sam Ravnborg
2005-09-11 15:45       ` Al Viro
2005-09-11 17:04         ` Sam Ravnborg
2005-09-11 21:29           ` Al Viro
2005-09-11 22:03             ` Sam Ravnborg
2005-09-11 23:16               ` Al Viro
2005-09-12 19:15                 ` Sam Ravnborg
2005-09-13  6:30                   ` Al Viro
2005-09-13  6:48                     ` Kyle Moffett
2005-09-13  6:53                       ` Keith Owens
2005-09-13  6:58                         ` Kyle Moffett
2005-09-13 21:55                     ` Al Viro
2005-09-15  1:07                   ` Al Viro
2005-09-10 19:08 ` Sam Ravnborg [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=20050910190822.GA31478@mars.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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