Commit a1f0f3c9 authored by Sam Ravnborg's avatar Sam Ravnborg

kbuild/all arch: Use filechk rule for offsets generation

Introduced filechk for all architectures that previously used
update-if-changed.
No longer add asmoffsets.h.tmp to CLEAN_FILES.
This is a private file to the filechk rule
parent 6374f649
...@@ -119,15 +119,12 @@ arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ ...@@ -119,15 +119,12 @@ arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
include/config/MARKER include/config/MARKER
include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
@echo -n ' Generating $@' $(call filechk,gen-asm-offsets)
@$(generate-asm-offsets.h) < $< > $@.tmp
@$(update-if-changed)
archclean: archclean:
$(Q)$(MAKE) -f scripts/Makefile.clean obj=$(boot) $(Q)$(MAKE) -f scripts/Makefile.clean obj=$(boot)
CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h.tmp \ CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h
include/asm-$(ARCH)/asm_offsets.h
define archhelp define archhelp
echo '* boot - Compressed kernel image (arch/alpha/boot/vmlinux.gz)' echo '* boot - Compressed kernel image (arch/alpha/boot/vmlinux.gz)'
......
...@@ -211,9 +211,7 @@ arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ ...@@ -211,9 +211,7 @@ arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
include/config/MARKER include/config/MARKER
include/asm-$(ARCH)/constants.h: arch/$(ARCH)/kernel/asm-offsets.s include/asm-$(ARCH)/constants.h: arch/$(ARCH)/kernel/asm-offsets.s
@echo -n ' Generating $@' $(call filechk,gen-asm-offsets)
@$(generate-asm-offsets.h) < $< > $@.tmp
@$(update-if-changed)
define archhelp define archhelp
echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
......
...@@ -86,8 +86,7 @@ LDFLAGS_BLOB := --format binary --oformat elf32-m68k ...@@ -86,8 +86,7 @@ LDFLAGS_BLOB := --format binary --oformat elf32-m68k
head-y := arch/m68knommu/platform/$(platform-y)/$(board-y)/crt0_$(model-y).o head-y := arch/m68knommu/platform/$(platform-y)/$(board-y)/crt0_$(model-y).o
CLEAN_FILES := include/asm-$(ARCH)/asm-offsets.h.tmp \ CLEAN_FILES := include/asm-$(ARCH)/asm-offsets.h \
include/asm-$(ARCH)/asm-offsets.h \
arch/$(ARCH)/kernel/asm-offsets.s arch/$(ARCH)/kernel/asm-offsets.s
core-y += arch/m68knommu/kernel/ \ core-y += arch/m68knommu/kernel/ \
...@@ -104,6 +103,4 @@ archclean: ...@@ -104,6 +103,4 @@ archclean:
include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \ include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
include/asm include/linux/version.h \ include/asm include/linux/version.h \
include/config/MARKER include/config/MARKER
@echo -n ' Generating $@' $(call filechk,gen-asm-offsets)
@$(generate-asm-offsets.h) < $< > $@.tmp
@$(update-if-changed)
...@@ -91,12 +91,9 @@ arch/parisc/kernel/asm-offsets.s: include/asm include/linux/version.h \ ...@@ -91,12 +91,9 @@ arch/parisc/kernel/asm-offsets.s: include/asm include/linux/version.h \
include/config/MARKER include/config/MARKER
include/asm-parisc/offsets.h: arch/parisc/kernel/asm-offsets.s include/asm-parisc/offsets.h: arch/parisc/kernel/asm-offsets.s
@echo -n ' Generating $@' $(call filechk,gen-asm-offsets)
@$(generate-asm-offsets.h) < $< > $@.tmp
@$(update-if-changed)
CLEAN_FILES += palo.conf lifimage include/asm-parisc/offsets.h \ CLEAN_FILES += palo.conf lifimage include/asm-parisc/offsets.h
include/asm-parisc/offsets.h.tmp
define archhelp define archhelp
@echo '* vmlinux - Uncompressed kernel image (./vmlinux)' @echo '* vmlinux - Uncompressed kernel image (./vmlinux)'
......
...@@ -80,12 +80,8 @@ prepare: include/asm-$(ARCH)/offsets.h checkbin ...@@ -80,12 +80,8 @@ prepare: include/asm-$(ARCH)/offsets.h checkbin
arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
include/config/MARKER include/config/MARKER
include/asm-$(ARCH)/offsets.h.tmp: arch/$(ARCH)/kernel/asm-offsets.s include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
@$(generate-asm-offsets.h) < $< > $@ $(call filechk,gen-asm-offsets)
include/asm-$(ARCH)/offsets.h: include/asm-$(ARCH)/offsets.h.tmp
@echo -n ' Generating $@'
@$(update-if-changed)
ifdef CONFIG_6xx ifdef CONFIG_6xx
# Ensure this is binutils 2.12.1 (or 2.12.90.0.7) or later # Ensure this is binutils 2.12.1 (or 2.12.90.0.7) or later
...@@ -106,6 +102,5 @@ checkbin: ...@@ -106,6 +102,5 @@ checkbin:
@true @true
endif endif
CLEAN_FILES += include/asm-$(ARCH)/offsets.h.tmp \ CLEAN_FILES += include/asm-$(ARCH)/offsets.h \
include/asm-$(ARCH)/offsets.h \
arch/$(ARCH)/kernel/asm-offsets.s arch/$(ARCH)/kernel/asm-offsets.s
...@@ -52,10 +52,6 @@ arch/ppc64/kernel/asm-offsets.s: include/asm include/linux/version.h \ ...@@ -52,10 +52,6 @@ arch/ppc64/kernel/asm-offsets.s: include/asm include/linux/version.h \
include/config/MARKER include/config/MARKER
include/asm-ppc64/offsets.h: arch/ppc64/kernel/asm-offsets.s include/asm-ppc64/offsets.h: arch/ppc64/kernel/asm-offsets.s
@echo -n ' Generating $@' $(call filechk,gen-asm-offsets)
@$(generate-asm-offsets.h) < $< > $@.tmp
@$(update-if-changed)
CLEAN_FILES += include/asm-ppc64/offsets.h.tmp \
include/asm-ppc64/offsets.h
CLEAN_FILES += include/asm-ppc64/offsets.h
...@@ -48,9 +48,6 @@ arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ ...@@ -48,9 +48,6 @@ arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
include/config/MARKER include/config/MARKER
include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
@echo -n ' Generating $@' $(call filechk,gen-asm-offsets)
@$(generate-asm-offsets.h) < $< > $@.tmp
@$(update-if-changed)
CLEAN_FILES += include/asm-$(ARCH)/offsets.h.tmp \ CLEAN_FILES += include/asm-$(ARCH)/offsets.h
include/asm-$(ARCH)/offsets.h
...@@ -48,9 +48,6 @@ arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ ...@@ -48,9 +48,6 @@ arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
include/config/MARKER include/config/MARKER
include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
@echo -n ' Generating $@' $(call filechk,gen-asm-offsets)
@$(generate-asm-offsets.h) < $< > $@.tmp
@$(update-if-changed)
CLEAN_FILES += include/asm-$(ARCH)/offsets.h.tmp \ CLEAN_FILES += include/asm-$(ARCH)/offsets.h
include/asm-$(ARCH)/offsets.h
...@@ -68,10 +68,7 @@ arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ ...@@ -68,10 +68,7 @@ arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
include/config/MARKER include/config/MARKER
include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
@echo -n ' Generating $@' $(call filechk,gen-asm-offsets)
@$(generate-asm-offsets.h) < $< > $@.tmp
@$(update-if-changed)
CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h.tmp \ CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h \
include/asm-$(ARCH)/asm_offsets.h \
arch/$(ARCH)/kernel/asm-offsets.s arch/$(ARCH)/kernel/asm-offsets.s
...@@ -55,14 +55,10 @@ prepare: include/asm-$(ARCH)/asm-consts.h ...@@ -55,14 +55,10 @@ prepare: include/asm-$(ARCH)/asm-consts.h
# Generate constants from C code for use by asm files # Generate constants from C code for use by asm files
arch/$(ARCH)/kernel/asm-consts.s: include/asm include/linux/version.h \ arch/$(ARCH)/kernel/asm-consts.s: include/asm include/linux/version.h \
include/config/MARKER include/config/MARKER
include/asm-$(ARCH)/asm-consts.h.tmp: arch/$(ARCH)/kernel/asm-consts.s
@$(generate-asm-offsets.h) < $< > $@
include/asm-$(ARCH)/asm-consts.h: include/asm-$(ARCH)/asm-consts.h.tmp
@echo -n ' Generating $@'
@$(update-if-changed)
include/asm-$(ARCH)/asm-consts.h: arch/$(ARCH)/kernel/asm-consts.s
$(call filechk,gen-asm-offsets)
CLEAN_FILES += include/asm-$(ARCH)/asm-consts.h.tmp \ CLEAN_FILES += include/asm-$(ARCH)/asm-consts.h \
include/asm-$(ARCH)/asm-consts.h \
arch/$(ARCH)/kernel/asm-consts.s \ arch/$(ARCH)/kernel/asm-consts.s \
root_fs_image.o root_fs_image.o
...@@ -86,15 +86,10 @@ prepare: include/asm-$(ARCH)/offset.h ...@@ -86,15 +86,10 @@ prepare: include/asm-$(ARCH)/offset.h
arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
include/config/MARKER include/config/MARKER
include/asm-$(ARCH)/offset.h.tmp: arch/$(ARCH)/kernel/asm-offsets.s
include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/asm-offsets.s include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/asm-offsets.s
@echo -n ' Generating $@' $(call filechk,gen-asm-offsets)
@$(generate-asm-offsets.h) < $< > $@.tmp
@$(update-if-changed)
CLEAN_FILES += include/asm-$(ARCH)/offset.h.tmp \ CLEAN_FILES += include/asm-$(ARCH)/offset.h
include/asm-$(ARCH)/offset.h
define archhelp define archhelp
echo '* bzImage - Compressed kernel image (arch/$(ARCH)/boot/bzImage)' echo '* bzImage - Compressed kernel image (arch/$(ARCH)/boot/bzImage)'
......
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