qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Victor Kaplansky <victork@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Stefan Weil" <sw@weilnetz.de>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	=?UTF-8?q?Alex=20=20Benn=C3=A9e?= <alex.bennee@linaro.org>,
	"Richard Henderson" <rth@twiddle.net>
Subject: [Qemu-devel] [PATCH v3 2/2] make: load only required dependency files.
Date: Sun, 9 Aug 2015 12:39:59 +0300	[thread overview]
Message-ID: <1439113148-21937-3-git-send-email-victork@redhat.com> (raw)
In-Reply-To: <1439113148-21937-1-git-send-email-victork@redhat.com>

The old rules.mak loads dependency .d files using include directive
with file glob pattern "*.d". This breaks the build when build tree has
remanent *.d files from another build.

This patch fixes this by
  - loading precise list of .d files made from *.o and *.mo.
  - specifying explicit list of required dependency info files for
     *.hex autogenerated sources.

Note that Makefile still includes some .d in rood directory by including
"*.d".

Signed-off-by: Victor Kaplansky <victork@redhat.com>
---
 hw/i386/Makefile.objs | 8 +++++++-
 rules.mak             | 2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
index bd4f147..ecdb400 100644
--- a/hw/i386/Makefile.objs
+++ b/hw/i386/Makefile.objs
@@ -7,8 +7,14 @@ obj-$(CONFIG_XEN) += ../xenpv/ xen/
 
 obj-y += kvmvapic.o
 obj-y += acpi-build.o
+
+gen-hex-y += hw/i386/acpi-dsdt.hex
+gen-hex-y += hw/i386/q35-acpi-dsdt.hex
+
 hw/i386/acpi-build.o: hw/i386/acpi-build.c \
-	hw/i386/acpi-dsdt.hex hw/i386/q35-acpi-dsdt.hex
+	$(gen-hex-y)
+
+-include $(gen-hex-y:.hex=.d)
 
 iasl-option=$(shell if test -z "`$(1) $(2) 2>&1 > /dev/null`" \
     ; then echo "$(2)"; else echo "$(3)"; fi ;)
diff --git a/rules.mak b/rules.mak
index 6e35c36..4551b9e 100644
--- a/rules.mak
+++ b/rules.mak
@@ -368,6 +368,6 @@ define unnest-vars
                 $(error $o added in $v but $o-objs is not set)))
         $(shell mkdir -p ./ $(sort $(dir $($v))))
         # Include all the .d files
-        $(eval -include $(addsuffix *.d, $(sort $(dir $($v)))))
+        $(eval -include $(patsubst %.o,%.d,$(patsubst %.mo,%.d,$($v))))
         $(eval $v := $(filter-out %/,$($v))))
 endef
-- 
--Victor

  parent reply	other threads:[~2015-08-09  9:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-09  9:39 [Qemu-devel] [PATCH v3 0/2] make: Cleanup and fix of loading of dependency info Victor Kaplansky
2015-08-09  9:39 ` [Qemu-devel] [PATCH v3 1/2] make: fix where dependency *.d are stored Victor Kaplansky
2015-08-09  9:39 ` Victor Kaplansky [this message]
2015-08-09 11:39   ` [Qemu-devel] [PATCH v3 2/2] make: load only required dependency files Michael S. Tsirkin
2015-08-09 11:54     ` Peter Maydell
2015-08-09 12:20       ` Michael S. Tsirkin
2015-08-10 10:14         ` Peter Maydell
2015-08-10 10:21           ` Michael S. Tsirkin
2015-08-10  9:46       ` Victor Kaplansky
2015-08-09 11:40 ` [Qemu-devel] [PATCH v3 0/2] make: Cleanup and fix of loading of dependency info Michael S. Tsirkin

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=1439113148-21937-3-git-send-email-victork@redhat.com \
    --to=victork@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=ehabkost@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=sw@weilnetz.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).