qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 1/2] Makefile: fix config-devices.mak generation


From: Blue Swirl
Subject: [Qemu-devel] [PATCH 1/2] Makefile: fix config-devices.mak generation
Date: Sun, 26 Sep 2010 09:05:44 +0000

The logic of detecting changes in default-configs/*.mak is
flawed as can be demonstrated by 'touch default-configs/*.mak'
followed by make. This results in a message claiming that user
made changes to the */config-devices.mak files.

Fix by separating the detection of changes made by the user and
changes in the default-configs.

Signed-off-by: Blue Swirl <address@hidden>
---
 Makefile |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 090d632..ff39025 100644
--- a/Makefile
+++ b/Makefile
@@ -43,9 +43,11 @@ config-all-devices.mak: $(SUBDIR_DEVICES_MAK)
 %/config-devices.mak: default-configs/%.mak
        $(call quiet-command,cat $< > address@hidden, "  GEN   $@")
        @if test -f $@; then \
-         if cmp -s address@hidden $@ || cmp -s $@ address@hidden; then \
-           mv address@hidden $@; \
-           cp -p $@ address@hidden; \
+         if cmp -s address@hidden $@; then \
+           if ! cmp -s $@ address@hidden; then \
+             mv address@hidden $@; \
+             cp -p $@ address@hidden; \
+           fi; \
          else \
            if test -f address@hidden; then \
              echo "WARNING: $@ (user modified) out of date.";\
-- 
1.6.2.4



reply via email to

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