From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZN2Vr-0004nJ-8a for qemu-devel@nongnu.org; Wed, 05 Aug 2015 13:30:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZN2Vo-0006w5-Dw for qemu-devel@nongnu.org; Wed, 05 Aug 2015 13:29:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55376) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZN2Vo-0006vy-2v for qemu-devel@nongnu.org; Wed, 05 Aug 2015 13:29:56 -0400 Date: Wed, 5 Aug 2015 20:29:33 +0300 From: Victor Kaplansky Message-ID: <1438795570-3930-3-git-send-email-victork@redhat.com> References: <1438795570-3930-1-git-send-email-victork@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1438795570-3930-1-git-send-email-victork@redhat.com> Subject: [Qemu-devel] [PATCH v2 2/2] make: load only required dependency files. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Eduardo Habkost , "Michael S. Tsirkin" , Stefan Weil , Paolo Bonzini , Richard Henderson 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 --- hw/i386/Makefile.objs | 2 ++ rules.mak | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs index bd4f147..311d364 100644 --- a/hw/i386/Makefile.objs +++ b/hw/i386/Makefile.objs @@ -10,6 +10,8 @@ obj-y += acpi-build.o hw/i386/acpi-build.o: hw/i386/acpi-build.c \ hw/i386/acpi-dsdt.hex hw/i386/q35-acpi-dsdt.hex +-include hw/i386/acpi-dsdt.d hw/i386/q35-acpi-dsdt.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