Commit 8d36a623 authored by Sam Ravnborg's avatar Sam Ravnborg

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: default avatarSam Ravnborg <sam@ravnborg.org>
parent 0a504f25
...@@ -22,6 +22,7 @@ sed-$(CONFIG_MIPS) := "/^@@@/s///p" ...@@ -22,6 +22,7 @@ sed-$(CONFIG_MIPS) := "/^@@@/s///p"
quiet_cmd_offsets = GEN $@ quiet_cmd_offsets = GEN $@
define cmd_offsets define cmd_offsets
mkdir -p $(dir $@); \
cat $< | \ cat $< | \
(set -e; \ (set -e; \
echo "#ifndef __ASM_OFFSETS_H__"; \ echo "#ifndef __ASM_OFFSETS_H__"; \
...@@ -43,6 +44,6 @@ arch/$(ARCH)/kernel/asm-offsets.s: arch/$(ARCH)/kernel/asm-offsets.c FORCE ...@@ -43,6 +44,6 @@ arch/$(ARCH)/kernel/asm-offsets.s: arch/$(ARCH)/kernel/asm-offsets.c FORCE
$(Q)mkdir -p $(dir $@) $(Q)mkdir -p $(dir $@)
$(call if_changed_dep,cc_s_c) $(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) $(call cmd,offsets)
...@@ -814,7 +814,7 @@ ifneq ($(KBUILD_MODULES),) ...@@ -814,7 +814,7 @@ ifneq ($(KBUILD_MODULES),)
endif endif
prepare0: prepare prepare1 FORCE prepare0: prepare prepare1 FORCE
$(Q)$(MAKE) $(build)=$(srctree) $(Q)$(MAKE) $(build)=.
# All the preparing.. # All the preparing..
prepare-all: prepare0 prepare-all: prepare0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment