s390 (1/8): Makefiles.
PATCH 1/1 s390 (1/8): Makefiles.
Makefile changes by Sam Ravnborg. Summary of changes:
o Added FORCE prerequisite in boot/Makefile
o Do not use shorthand targets when calling the boot/Makefile
o No longer use BOOT_IMAGE, not needed now
o Use kbuild clean infrastructure when cleaning up in boot
o Offset generation shrinked with one rule
o removed inclusion of Rules.make in all Makefiles
o no longer use the descend macro, use $(Q)$(MAKE) as replacement
diffstat:
arch/s390/Makefile | 31 ++++++++++++++++--------------- arch/s390/boot/Makefile | 25 ++++++++++--------------- arch/s390/defconfig | 2 ++ arch/s390/kernel/Makefile | 2 -- arch/s390/lib/Makefile | 3 --- arch/s390/math-emu/Makefile | 8 ++------ arch/s390/mm/Makefile | 2 -- arch/s390x/Makefile | 27 ++++++++++++++------------- arch/s390x/boot/Makefile | 25 ++++++++++--------------- arch/s390x/defconfig | 2 ++ arch/s390x/kernel/Makefile | 2 -- arch/s390x/lib/Makefile | 3 --- arch/s390x/mm/Makefile | 4 +--- drivers/s390/Makefile | 2 +- drivers/s390/misc/Makefile | 7 ------- 15 files changed, 58 insertions(+), 87 deletions(-)
arch/s390/Makefile +16 -15
@@ -20,36 +20,37 @@ CFLAGS += -pipe -fno-strength-reduce -HEAD := arch/s390/kernel/head.o arch/s390/kernel/init_task.o +HEAD := arch/$(ARCH)/kernel/head.o arch/$(ARCH)/kernel/init_task.o -core-y += arch/s390/mm/ arch/s390/kernel/ -drivers-y += drivers/s390/ -drivers-$(CONFIG_MATHEMU) += arch/s390/math-emu/ -libs-y += arch/s390/lib/ +core-y += arch/$(ARCH)/mm/ arch/$(ARCH)/kernel/ +libs-y += arch/$(ARCH)/lib/ +drivers-y += drivers/s390/ +drivers-$(CONFIG_MATHEMU) += arch/$(ARCH)/math-emu/ + + +makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/$(ARCH)/boot $(1) all: image listing -makeboot = $(call descend,arch/$(ARCH)/boot,$(1)) -BOOTIMAGE= arch/$(ARCH)/boot/image +listing image: vmlinux + $(call makeboot,arch/$(ARCH)/boot/$@) -listing install image: vmlinux - +@$(call makeboot,BOOTIMAGE=$(BOOTIMAGE) $@) +install: vmlinux + $(call makeboot, $@) +archmrproper: archclean: - +@$(call makeboot,clean) + $(Q)$(MAKE) -f scripts/Makefile.clean obj=arch/$(ARCH)/boot -archmrproper: prepare: include/asm-$(ARCH)/offsets.h 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 +include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s @echo -n ' Generating $@' + @$(generate-asm-offsets.h) < $< > [email protected] @$(update-if-changed) CLEAN_FILES += include/asm-$(ARCH)/offsets.h.tmp \
arch/s390/boot/Makefile +10 -15
@@ -2,26 +2,21 @@ # Makefile for the linux s390-specific parts of the memory manager. # -EXTRA_AFLAGS := -traditional +EXTRA_TARGETS := image listing +EXTRA_AFLAGS := -traditional -include $(TOPDIR)/Rules.make -quiet_cmd_listing = OBJDUMP $(echo_target) -cmd_listing = $(OBJDUMP) --disassemble --disassemble-all \ - --disassemble-zeroes --reloc vmlinux > $@ +quiet_cmd_listing = OBJDUMP $@ + cmd_listing = $(OBJDUMP) --disassemble --disassemble-all \ + --disassemble-zeroes --reloc vmlinux > $@ -$(obj)/image: vmlinux +$(obj)/image: vmlinux FORCE $(call if_changed,objcopy) -$(obj)/listing: vmlinux +$(obj)/listing: vmlinux FORCE $(call if_changed,listing) -image: $(obj)/image -listing: $(obj)/listing - -clean: - rm -f $(obj)/image $(obj)/listing - -install: $(CONFIGURE) $(BOOTIMAGE) - sh -x $(obj)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map Kerntypes "$(INSTALL_PATH)" +install: $(CONFIGURE) $(obj)/image + sh -x $(obj)/install.sh $(KERNELRELEASE) $(obj)/image \ + System.map Kerntypes "$(INSTALL_PATH)"
arch/s390/defconfig +2 -0
@@ -321,6 +321,8 @@ # CONFIG_CRYPTO_SHA256 is not set # CONFIG_CRYPTO_DES is not set # CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set # CONFIG_CRYPTO_TEST is not set #
arch/s390/kernel/Makefile +0 -2
@@ -17,5 +17,3 @@ # Kernel debugging # obj-$(CONFIG_REMOTE_DEBUG) += gdb-stub.o #gdb-low.o - -include $(TOPDIR)/Rules.make
arch/s390/lib/Makefile +0 -3
@@ -7,6 +7,3 @@ EXTRA_AFLAGS := -traditional obj-y = delay.o memset.o strcmp.o strncpy.o uaccess.o - -include $(TOPDIR)/Rules.make -
arch/s390/math-emu/Makefile +2 -6
@@ -4,9 +4,5 @@ obj-$(CONFIG_MATHEMU) := math.o qrnnd.o -EXTRA_CFLAGS = -I. -I$(TOPDIR)/include/math-emu -w -EXTRA_AFLAGS := -traditional - -include $(TOPDIR)/Rules.make - - +EXTRA_CFLAGS := -I$(src) -Iinclude/math-emu -w +EXTRA_AFLAGS := -traditional
arch/s390/mm/Makefile +0 -2
@@ -3,5 +3,3 @@ # obj-y := init.o fault.o ioremap.o extable.o - -include $(TOPDIR)/Rules.make
arch/s390x/Makefile +14 -13
@@ -21,35 +21,36 @@ CFLAGS += -pipe -fno-strength-reduce -HEAD := arch/s390x/kernel/head.o arch/s390x/kernel/init_task.o +HEAD := arch/$(ARCH)/kernel/head.o arch/$(ARCH)/kernel/init_task.o -core-y += arch/s390x/mm/ arch/s390x/kernel/ +core-y += arch/$(ARCH)/mm/ arch/$(ARCH)/kernel/ +libs-y += arch/$(ARCH)/lib/ drivers-y += drivers/s390/ -libs-y += arch/s390x/lib/ + + +makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/$(ARCH)/boot $(1) all: image listing -makeboot = $(call descend,arch/$(ARCH)/boot,$(1)) -BOOTIMAGE= arch/$(ARCH)/boot/image +listing image: vmlinux + $(call makeboot,arch/$(ARCH)/boot/$@) -listing install image: vmlinux - +@$(call makeboot,BOOTIMAGE=$(BOOTIMAGE) $@) +install: vmlinux + $(call makeboot, $@) +archmrproper: archclean: - +@$(call makeboot,clean) + $(Q)$(MAKE) -f scripts/Makefile.clean obj=arch/$(ARCH)/boot -archmrproper: prepare: include/asm-$(ARCH)/offsets.h 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 +include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s @echo -n ' Generating $@' + @$(generate-asm-offsets.h) < $< > [email protected] @$(update-if-changed) CLEAN_FILES += include/asm-$(ARCH)/offsets.h.tmp \
arch/s390x/boot/Makefile +10 -15
@@ -2,26 +2,21 @@ # Makefile for the linux s390-specific parts of the memory manager. # -EXTRA_AFLAGS := -traditional +EXTRA_TARGETS := image listing +EXTRA_AFLAGS := -traditional -include $(TOPDIR)/Rules.make -quiet_cmd_listing = OBJDUMP $(echo_target) -cmd_listing = $(OBJDUMP) --disassemble --disassemble-all \ - --disassemble-zeroes --reloc vmlinux > $@ +quiet_cmd_listing = OBJDUMP $@ + cmd_listing = $(OBJDUMP) --disassemble --disassemble-all \ + --disassemble-zeroes --reloc vmlinux > $@ -$(obj)/image: vmlinux +$(obj)/image: vmlinux FORCE $(call if_changed,objcopy) -$(obj)/listing: vmlinux +$(obj)/listing: vmlinux FORCE $(call if_changed,listing) -image: $(obj)/image -listing: $(obj)/listing - -clean: - rm -f $(obj)/image $(obj)/listing - -install: $(CONFIGURE) $(BOOTIMAGE) - sh -x $(obj)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map Kerntypes "$(INSTALL_PATH)" +install: $(CONFIGURE) $(obj)/image + sh -x $(obj)/install.sh $(KERNELRELEASE) $(obj)/image \ + System.map Kerntypes "$(INSTALL_PATH)"
arch/s390x/defconfig +2 -0
@@ -382,6 +382,8 @@ # CONFIG_CRYPTO_SHA256 is not set # CONFIG_CRYPTO_DES is not set # CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set # CONFIG_CRYPTO_TEST is not set #
arch/s390x/kernel/Makefile +0 -2
@@ -24,8 +24,6 @@ exec32.o exec_domain32.o obj-$(CONFIG_BINFMT_ELF32) += binfmt_elf32.o -include $(TOPDIR)/Rules.make - # # This is just to get the dependencies... #
arch/s390x/lib/Makefile +0 -3
@@ -7,6 +7,3 @@ EXTRA_AFLAGS := -traditional obj-y = delay.o memset.o strcmp.o strncpy.o uaccess.o - -include $(TOPDIR)/Rules.make -
arch/s390x/mm/Makefile +1 -3
@@ -1,7 +1,5 @@ # -# Makefile for the linux i386-specific parts of the memory manager. +# Makefile for the linux s390-specific parts of the memory manager. # obj-y := init.o fault.o ioremap.o extable.o - -include $(TOPDIR)/Rules.make
drivers/s390/Makefile +1 -1
@@ -3,7 +3,7 @@ # obj-y += s390mach.o sysinfo.o -obj-y += cio/ block/ char/ misc/ net/ +obj-y += cio/ block/ char/ net/ drivers-y += drivers/s390/built-in.o
drivers/s390/misc/Makefile +0 -7
@@ -1,7 +0,0 @@ -# -# S/390 miscellaneous devices -# - -# placeholder for stuff to come... - -include $(TOPDIR)/Rules.make