qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Makefile: Update unmodified config-devices.mak


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] Makefile: Update unmodified config-devices.mak automatically
Date: Fri, 08 Jan 2010 10:34:32 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0

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<address@hidden>\

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 $<  >  address@hidden, "  GEN   $@")
-       @if test -f $@ ; then \
-         echo "WARNING: $@ out of date." ;\
-         echo "Run \"make defconfig\" to regenerate." ; \
-         rm address@hidden ; \
+       @if test -f $@; then \
+         if cmp -s address@hidden $@ || cmp -s $@ address@hidden; then \
+           mv address@hidden $@; \
+           cp -p $@ address@hidden; \
+         else \
+           if test -f address@hidden; then \
+             echo "WARNING: $@ (user modified) out of date.";\
+           else \
+             echo "WARNING: $@ out of date.";\
+           fi; \
+           echo "Run \"make defconfig\" to regenerate."; \
+           rm address@hidden; \
+         fi; \
         else \
-         mv address@hidden $@ ; \
+         mv address@hidden $@; \
+         cp -p $@ address@hidden; \
         fi

  defconfig:





reply via email to

[Prev in Thread] Current Thread [Next in Thread]