qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] make: automatically include dependencies in recursive subdir rules
@ 2012-06-17 14:57 Anthony Liguori
  2012-06-17 15:20 ` Blue Swirl
  2012-06-17 15:33 ` Andreas Färber
  0 siblings, 2 replies; 8+ messages in thread
From: Anthony Liguori @ 2012-06-17 14:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Anthony Liguori, Andreas Faerber

I think I understand enough of what's going on in these rules to ensure this is
right.  But I could certainly use a second or third opinion...

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 Makefile  |    4 ++--
 rules.mak |    1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index cce45fb..593bd9b 100644
--- a/Makefile
+++ b/Makefile
@@ -405,5 +405,5 @@ tar:
 Makefile: $(GENERATED_HEADERS)
 
 # Include automatically generated dependency files
--include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d ui/*.d qapi/*.d)
--include $(wildcard qga/*.d hw/*.d hw/usb/*.d qom/*.d)
+# All subdir dependencies come automatically from our recursive subdir rules
+-include $(wildcard *.d)
diff --git a/rules.mak b/rules.mak
index 4bc5e52..8c5ef95 100644
--- a/rules.mak
+++ b/rules.mak
@@ -94,6 +94,7 @@ 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 $(SRC_PATH)/$1/*.d))
 $(eval obj := $(patsubst %/$1,%,$(obj)))
 $(foreach var,$(nested-vars),$(call pop-var,$(var),$1/))
 endef
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-06-18  0:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-17 14:57 [Qemu-devel] [PATCH] make: automatically include dependencies in recursive subdir rules Anthony Liguori
2012-06-17 15:20 ` Blue Swirl
2012-06-17 16:23   ` Andreas Färber
2012-06-17 17:00     ` Andreas Färber
2012-06-17 18:46       ` Anthony Liguori
2012-06-17 19:53         ` Andreas Färber
2012-06-18  0:06           ` Anthony Liguori
2012-06-17 15:33 ` Andreas Färber

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).