Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
kbuild: fix generic asm-offsets.h support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sam Ravnborg committed Sep 10, 2005
1 parent 0a504f2 commit 8d36a62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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__"; \
Expand All @@ -43,6 +44,6 @@ arch/$(ARCH)/kernel/asm-offsets.s: arch/$(ARCH)/kernel/asm-offsets.c FORCE
$(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)

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8d36a62

Please sign in to comment.