tree 9864f1e007165b4612e617890738e9ad3c2912e3
parent a24c8481b6439cb151a4750cc278ea2df4fb0e53
author Geoff Levand <[EMAIL PROTECTED]> Thu, 11 Aug 2005 07:57:42 -0700
committer Paul Mackerras <[EMAIL PROTECTED]> Fri, 09 Sep 2005 22:11:35 +1000

[PATCH] ppc64: makefile cleanup

This patch cleans up the output generated by ppc64 builds.

Signed-off-by: Geoff Levand <[EMAIL PROTECTED]>
Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>

 arch/ppc64/boot/Makefile |   28 +++++++++++++++-------------
 1 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/arch/ppc64/boot/Makefile b/arch/ppc64/boot/Makefile
--- a/arch/ppc64/boot/Makefile
+++ b/arch/ppc64/boot/Makefile
@@ -66,7 +66,7 @@ extra-y                       := initrd.o
 quiet_cmd_ramdisk = RAMDISK $@
       cmd_ramdisk = $(obj)/addRamDisk $(obj)/ramdisk.image.gz $< $@
 
-quiet_cmd_stripvm = STRIP $@
+quiet_cmd_stripvm = STRIP   $@
       cmd_stripvm = $(STRIP) -s $< -o $@
 
 vmlinux.strip: vmlinux FORCE
@@ -74,9 +74,17 @@ vmlinux.strip: vmlinux FORCE
 $(obj)/vmlinux.initrd: vmlinux.strip $(obj)/addRamDisk $(obj)/ramdisk.image.gz 
FORCE
        $(call if_changed,ramdisk)
 
-addsection = $(CROSS32OBJCOPY) $(1) \
-               --add-section=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, 
$(1)))=$(patsubst %.o,%.gz, $(1)) \
-               --set-section-flags=.kernel:$(strip $(patsubst 
$(obj)/kernel-%.o,%, $(1)))=$(OBJCOPYFLAGS)
+quiet_cmd_addsection = ADDSEC  $@
+      cmd_addsection = $(CROSS32OBJCOPY) $@ \
+               --add-section=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, 
$@))=$(patsubst %.o,%.gz, $@) \
+               --set-section-flags=.kernel:$(strip $(patsubst 
$(obj)/kernel-%.o,%, $@))=$(OBJCOPYFLAGS)
+
+quiet_cmd_imagesize = GENSIZE $@
+      cmd_imagesize = ls -l vmlinux.strip | \
+               awk '{printf "/* generated -- do not edit! */\n" "unsigned long 
vmlinux_filesize = %d;\n", $$5}' \
+               > $(obj)/imagesize.c && \
+               $(CROSS_COMPILE)nm -n vmlinux | tail -n 1 | \
+               awk '{printf "unsigned long vmlinux_memsize = 0x%s;\n", 
substr($$1,8)}' >> $(obj)/imagesize.c
 
 quiet_cmd_addnote = ADDNOTE $@
       cmd_addnote = $(obj)/addnote $@
@@ -88,11 +96,11 @@ $(obj)/kernel-initrd.gz: $(obj)/ramdisk.
        cp -f $(obj)/ramdisk.image.gz $@
 
 $(call src-sec, $(required) $(initrd)): $(obj)/kernel-%.c: $(obj)/kernel-%.gz 
FORCE
-       touch $@
+       @touch $@
 
 $(call obj-sec, $(required) $(initrd)): $(obj)/kernel-%.o: $(obj)/kernel-%.c 
FORCE
        $(call if_changed_dep,bootcc)
-       $(call addsection, $@)
+       $(call cmd,addsection)
 
 $(obj)/zImage.vmode: obj-boot += $(call obj-sec, $(required))
 $(obj)/zImage.vmode: $(call obj-sec, $(required)) $(obj-boot) FORCE
@@ -111,13 +119,7 @@ $(obj)/zImage.initrd: $(obj)/zImage.init
        $(call if_changed,addnote)
 
 $(obj)/imagesize.c: vmlinux.strip
-       @echo Generating $@
-       ls -l vmlinux.strip | \
-       awk '{printf "/* generated -- do not edit! */\n" \
-               "unsigned long vmlinux_filesize = %d;\n", $$5}' > 
$(obj)/imagesize.c
-       $(CROSS_COMPILE)nm -n vmlinux | tail -n 1 | \
-       awk '{printf "unsigned long vmlinux_memsize = 0x%s;\n", substr($$1,8)}' 
\
-               >> $(obj)/imagesize.c
+       $(call cmd,imagesize)
 
 install: $(CONFIGURE) $(BOOTIMAGE)
        sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux 
System.map "$(INSTALL_PATH)" "$(BOOTIMAGE)"
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to