qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Stefan Weil <weil@mail.berlios.de>
Cc: quintela@trasno.org, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] Makefile: Update unmodified config-devices.mak automatically
Date: Fri, 08 Jan 2010 10:34:32 -0600	[thread overview]
Message-ID: <4B475E98.3060900@codemonkey.ws> (raw)
In-Reply-To: <1261319943-9224-1-git-send-email-weil@mail.berlios.de>

On 12/20/2009 08:39 AM, Stefan Weil wrote:
> This makes rebuilds after source updates easier
> for most users (who don't edit config-devices.mak).
>
> Signed-off-by: Stefan Weil<weil@mail.berlios.de>\
>    

Applied.  Thanks.

Regards,

Anthony Liguori
> ---
>   Makefile |   20 +++++++++++++++-----
>   1 files changed, 15 insertions(+), 5 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index c1fa08c..684365d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -43,12 +43,22 @@ config-all-devices.mak: $(SUBDIR_DEVICES_MAK)
>
>   %/config-devices.mak: default-configs/%.mak
>   	$(call quiet-command,cat $<  >  $@.tmp, "  GEN   $@")
> -	@if test -f $@ ; then \
> -	  echo "WARNING: $@ out of date." ;\
> -	  echo "Run \"make defconfig\" to regenerate." ; \
> -	  rm $@.tmp ; \
> +	@if test -f $@; then \
> +	  if cmp -s $@.old $@ || cmp -s $@ $@.tmp; then \
> +	    mv $@.tmp $@; \
> +	    cp -p $@ $@.old; \
> +	  else \
> +	    if test -f $@.old; then \
> +	      echo "WARNING: $@ (user modified) out of date.";\
> +	    else \
> +	      echo "WARNING: $@ out of date.";\
> +	    fi; \
> +	    echo "Run \"make defconfig\" to regenerate."; \
> +	    rm $@.tmp; \
> +	  fi; \
>   	 else \
> -	  mv $@.tmp $@ ; \
> +	  mv $@.tmp $@; \
> +	  cp -p $@ $@.old; \
>   	 fi
>
>   defconfig:
>    

      parent reply	other threads:[~2010-01-08 16:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m3r5rl376u.fsf@neno.neno>
2009-12-20 14:39 ` [Qemu-devel] [PATCH] Makefile: Update unmodified config-devices.mak automatically Stefan Weil
     [not found]   ` <20091224125823.GA31587@redhat.com>
     [not found]     ` <4B336D4E.2000707@mail.berlios.de>
     [not found]       ` <20091224134057.GA31674@redhat.com>
     [not found]         ` <m37hscct3e.fsf@neno.neno>
     [not found]           ` <20091224150611.GA422@redhat.com>
2010-01-05 21:25             ` [Qemu-devel] " Stefan Weil
2010-01-08 16:34   ` Anthony Liguori [this message]

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=4B475E98.3060900@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@trasno.org \
    --cc=weil@mail.berlios.de \
    /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;
as well as URLs for NNTP newsgroup(s).