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