qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: jan.kiszka@siemens.com, aliguori@us.ibm.com, avi@redhat.com
Subject: [Qemu-devel] [PATCH 2/2] build: get dependency file directories from object file names
Date: Wed, 11 Jul 2012 16:40:21 +0200	[thread overview]
Message-ID: <1342017621-12650-3-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1342017621-12650-1-git-send-email-pbonzini@redhat.com>

After commit dcff25f2cd8c11a9368cc2369aeb0319c32d9e26, Dependency file
are taken from the directories that have a Makefile.objs file.  This is
not enough, since files can be included from other directories.
So, pick them from directories that have an object file in them.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 Makefile        |    2 +-
 Makefile.dis    |    3 ---
 Makefile.hw     |    3 ---
 Makefile.target |    3 ---
 Makefile.user   |    3 ---
 rules.mak       |    3 ++-
 6 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/Makefile b/Makefile
index 1b7cd2f..221319e 100644
--- a/Makefile
+++ b/Makefile
@@ -406,5 +406,5 @@ tar:
 Makefile: $(GENERATED_HEADERS)
 
 # Include automatically generated dependency files
-# All subdir dependencies come automatically from our recursive subdir rules
--include $(wildcard *.d)
+# Dependencies in Makefile.objs files come from our recursive subdir rules
+-include $(wildcard *.d tests/*.d)
diff --git a/Makefile.dis b/Makefile.dis
index 09060f0..2cfec6a 100644
--- a/Makefile.dis
+++ b/Makefile.dis
@@ -18,6 +18,3 @@ all: $(libdis-y)
 
 clean:
 	rm -f *.o *.d *.a *~
-
-# Include automatically generated dependency files
--include $(wildcard *.d)
diff --git a/Makefile.hw b/Makefile.hw
index 28fe100..59f5b48 100644
--- a/Makefile.hw
+++ b/Makefile.hw
@@ -21,6 +21,3 @@ all: $(hw-obj-y)
 clean:
 	rm -f $(addsuffix *.o, $(sort $(dir $(hw-obj-y))))
 	rm -f $(addsuffix *.d, $(sort $(dir $(hw-obj-y))))
-
-# Include automatically generated dependency files
--include $(patsubst %.o, %.d, $(hw-obj-y))
diff --git a/Makefile.target b/Makefile.target
index 74f7a4a..7892a8d 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -214,6 +214,3 @@ endif
 
 GENERATED_HEADERS += config-target.h
 Makefile: $(GENERATED_HEADERS)
-
-# Include automatically generated dependency files
--include $(wildcard *.d fpu/*.d tcg/*.d)
diff --git a/Makefile.user b/Makefile.user
index 1783b2a..9302d33 100644
--- a/Makefile.user
+++ b/Makefile.user
@@ -22,6 +22,3 @@ clean:
 	for d in . trace; do \
 	rm -f $$d/*.o $$d/*.d $$d/*.a $$d/*~; \
 	done
-
-# Include automatically generated dependency files
--include $(wildcard *.d)
diff --git a/rules.mak b/rules.mak
index 60f3e96..a284946 100644
--- a/rules.mak
+++ b/rules.mak
@@ -94,7 +94,6 @@ define unnest-dir
 $(foreach var,$(nested-vars),$(call push-var,$(var),$1/))
 $(eval obj := $(obj)/$1)
 $(eval include $(SRC_PATH)/$1/Makefile.objs)
-$(eval -include $(wildcard $1/*.d))
 $(eval obj := $(patsubst %/$1,%,$(obj)))
 $(foreach var,$(nested-vars),$(call pop-var,$(var),$1/))
 endef
@@ -113,4 +112,6 @@ define unnest-vars
 $(call unnest-vars-1)
 $(foreach var,$(nested-vars),$(eval $(var) := $(filter-out %/, $($(var)))))
 $(shell mkdir -p $(sort $(foreach var,$(nested-vars),$(dir $($(var))))))
+$(foreach var,$(nested-vars), $(eval \
+  -include $(addsuffix *.d, $(sort $(dir $($(var)))))))
 endef
-- 
1.7.10.4

  parent reply	other threads:[~2012-07-11 14:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11 14:40 [Qemu-devel] [PATCH 0/2] build: get all *.d files Paolo Bonzini
2012-07-11 14:40 ` [Qemu-devel] [PATCH 1/2] build: include qapi-generated/ files in qga/Makefile.objs Paolo Bonzini
2012-07-11 15:25   ` Michael Roth
2012-07-11 15:28     ` Paolo Bonzini
2012-07-11 16:00       ` Michael Roth
2012-07-11 14:40 ` Paolo Bonzini [this message]
2012-07-24 11:38   ` [Qemu-devel] [PATCH 2/2] build: get dependency file directories from object file names Andreas Färber
2012-07-24 11:43     ` Paolo Bonzini
2012-07-24 11:53       ` Andreas Färber
2012-07-24 12:02         ` Paolo Bonzini
2012-07-24 11:17 ` [Qemu-devel] [PATCH 0/2] build: get all *.d files Paolo Bonzini
2012-07-28 12:16 ` Blue Swirl

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=1342017621-12650-3-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).