diff options
author | Sam Ravnborg <sam@mars.ravnborg.org> | 2005-09-10 15:05:36 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2005-09-10 15:05:36 -0400 |
commit | 8d36a62364b6b04dc7b0e9fe09f6968f4e5a1f0a (patch) | |
tree | 10d5400d627236f7308f13238fa6559ccd9d79d1 | |
parent | 0a504f259c90fb41d3495d490fc9dbe2530c8749 (diff) |
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>
-rw-r--r-- | Kbuild | 5 | ||||
-rw-r--r-- | Makefile | 2 |
2 files changed, 4 insertions, 3 deletions
@@ -4,7 +4,7 @@ | |||
4 | # 1) Generate asm-offsets.h | 4 | # 1) Generate asm-offsets.h |
5 | 5 | ||
6 | ##### | 6 | ##### |
7 | # 1) Generate asm-offsets.h | 7 | # 1) Generate asm-offsets.h |
8 | # | 8 | # |
9 | 9 | ||
10 | offsets-file := include/asm-$(ARCH)/asm-offsets.h | 10 | offsets-file := include/asm-$(ARCH)/asm-offsets.h |
@@ -22,6 +22,7 @@ sed-$(CONFIG_MIPS) := "/^@@@/s///p" | |||
22 | 22 | ||
23 | quiet_cmd_offsets = GEN $@ | 23 | quiet_cmd_offsets = GEN $@ |
24 | define cmd_offsets | 24 | define cmd_offsets |
25 | mkdir -p $(dir $@); \ | ||
25 | cat $< | \ | 26 | cat $< | \ |
26 | (set -e; \ | 27 | (set -e; \ |
27 | echo "#ifndef __ASM_OFFSETS_H__"; \ | 28 | echo "#ifndef __ASM_OFFSETS_H__"; \ |
@@ -43,6 +44,6 @@ arch/$(ARCH)/kernel/asm-offsets.s: arch/$(ARCH)/kernel/asm-offsets.c FORCE | |||
43 | $(Q)mkdir -p $(dir $@) | 44 | $(Q)mkdir -p $(dir $@) |
44 | $(call if_changed_dep,cc_s_c) | 45 | $(call if_changed_dep,cc_s_c) |
45 | 46 | ||
46 | $(srctree)/$(offsets-file): arch/$(ARCH)/kernel/asm-offsets.s Kbuild | 47 | $(obj)/$(offsets-file): arch/$(ARCH)/kernel/asm-offsets.s Kbuild |
47 | $(call cmd,offsets) | 48 | $(call cmd,offsets) |
48 | 49 | ||
@@ -814,7 +814,7 @@ ifneq ($(KBUILD_MODULES),) | |||
814 | endif | 814 | endif |
815 | 815 | ||
816 | prepare0: prepare prepare1 FORCE | 816 | prepare0: prepare prepare1 FORCE |
817 | $(Q)$(MAKE) $(build)=$(srctree) | 817 | $(Q)$(MAKE) $(build)=. |
818 | 818 | ||
819 | # All the preparing.. | 819 | # All the preparing.. |
820 | prepare-all: prepare0 | 820 | prepare-all: prepare0 |