Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Wu Zhangjin <wuzhangjin@gmail.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	linux-mips <linux-mips@linux-mips.org>
Subject: Re: [PATCH] mips: refactor arch/mips/boot/Makefile
Date: Sun, 30 May 2010 11:11:25 +0800	[thread overview]
Message-ID: <1275189085.4258.12.camel@localhost> (raw)
In-Reply-To: <20100529195752.GA19568@merkur.ravnborg.org>

Hi, Sam

This patch really make the Makefile looks better,

Could you please apply the similar modification to
arch/mips/boot/compressed/Makefile? thanks!

Regards,
	Wu Zhangjin

On Sat, 2010-05-29 at 21:57 +0200, Sam Ravnborg wrote:
> >From 0b95917f21f145d07351fb098b3f4804c4bf6ca1 Mon Sep 17 00:00:00 2001
> From: Sam Ravnborg <sam@ravnborg.org>
> Date: Sat, 29 May 2010 21:50:50 +0200
> Subject: [PATCH] mips: refactor arch/mips/boot/Makefile
> 
> - remove stuff that is not needed
>   VMLINUX assignment, all: rule, unused assignment
> - use hostprogs-y for the host program
> - use direct assignmnet when possible
> - use kbuild rules for the three targets - to beautify output
> - update clean-files to specify the targets that is built in the top.level dir
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> ---
>  arch/mips/boot/Makefile |   30 +++++++++++++++---------------
>  1 files changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile
> index de20e81..28dbf92 100644
> --- a/arch/mips/boot/Makefile
> +++ b/arch/mips/boot/Makefile
> @@ -11,32 +11,32 @@
>  # Some DECstations need all possible sections of an ECOFF executable
>  #
>  ifdef CONFIG_MACH_DECSTATION
> -  E2EFLAGS = -a
> -else
> -  E2EFLAGS =
> +  E2EFLAGS := -a
>  endif
>  
>  #
>  # Drop some uninteresting sections in the kernel.
>  # This is only relevant for ELF kernels but doesn't hurt a.out
>  #
> -drop-sections	= .reginfo .mdebug .comment .note .pdr .options .MIPS.options
> -strip-flags	= $(addprefix --remove-section=,$(drop-sections))
> +drop-sections := .reginfo .mdebug .comment .note .pdr .options .MIPS.options
> +strip-flags   := $(addprefix --remove-section=,$(drop-sections))
>  
> -VMLINUX = vmlinux
> -
> -all: vmlinux.ecoff vmlinux.srec
> +hostprogs-y := elf2ecoff
>  
> +quiet_cmd_ecoff = ECOFF   $@
> +      cmd_ecoff = $(obj)/elf2ecoff $(VMLINUX) $(obj)/vmlinux.ecoff $(E2EFLAGS)
>  vmlinux.ecoff: $(obj)/elf2ecoff $(VMLINUX)
> -	$(obj)/elf2ecoff $(VMLINUX) $(obj)/vmlinux.ecoff $(E2EFLAGS)
> -
> -$(obj)/elf2ecoff: $(obj)/elf2ecoff.c
> -	$(HOSTCC) -o $@ $^
> +	$(call cmd,ecoff)
>  
> +quiet_cmd_bin = OBJCOPY $@
> +      cmd_bin = $(OBJCOPY) -O binary $(strip-flags) $(VMLINUX) $(obj)/vmlinux.bin
>  vmlinux.bin: $(VMLINUX)
> -	$(OBJCOPY) -O binary $(strip-flags) $(VMLINUX) $(obj)/vmlinux.bin
> +	$(call cmd,bin)
>  
> +quiet_cmd_srec = OBJCOPY $@
> +      cmd_srec = $(OBJCOPY) -S -O srec $(strip-flags) $(VMLINUX) $(obj)/vmlinux.srec
>  vmlinux.srec: $(VMLINUX)
> -	$(OBJCOPY) -S -O srec $(strip-flags) $(VMLINUX) $(obj)/vmlinux.srec
> +	$(call cmd,srec)
>  
> -clean-files += elf2ecoff
> +# clean files created in top-level directory
> +clean-files := $(objtree)/vmlinux.*

  reply	other threads:[~2010-05-30  3:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-29 19:57 [PATCH] mips: refactor arch/mips/boot/Makefile Sam Ravnborg
2010-05-30  3:11 ` Wu Zhangjin [this message]
2010-05-30  5:23   ` Sam Ravnborg
2010-05-30  9:11     ` Wu Zhangjin
  -- strict thread matches above, loose matches on Subject: below --
2010-05-29 19:50 Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1275189085.4258.12.camel@localhost \
    --to=wuzhangjin@gmail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox