From: Paolo Bonzini <pbonzini@redhat.com>
To: Victor Kaplansky <victork@redhat.com>, qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
Eduardo Habkost <ehabkost@redhat.com>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH] make: explicit dependencies for ACPI gen sources
Date: Wed, 5 Aug 2015 11:50:54 +0200 [thread overview]
Message-ID: <55C1DC7E.3090307@redhat.com> (raw)
In-Reply-To: <1438705028-10866-1-git-send-email-victork@redhat.com>
On 04/08/2015 18:21, Victor Kaplansky wrote:
> Rebuilding QEMU after switching versions from git can cause make failure
> if IASL is enabled. This is caused by including stale *.d info from
> previous build.
>
> To prevent this in the future we generate dependency info for generated
> ACPI sources in *.dep instead regular *.d and include them explicitly.
> This will allow us not to break future builds when one of such generated
> sources is removed - by removing explicit include of removed dependency.
>
> By itself this doesn't fix broken builds from the past and this will be
> done by the following patch.
Does this happen the same way if you are removing a .c file? If not,
can the same solution be used for .c and .dsl files?
Paolo
> Signed-off-by: Victor Kaplansky <victork@redhat.com>
> ---
> hw/i386/Makefile.objs | 4 +++-
> rules.mak | 1 +
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
> index bd4f147..bcc7083 100644
> --- a/hw/i386/Makefile.objs
> +++ b/hw/i386/Makefile.objs
> @@ -10,13 +10,15 @@ 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.dep hw/i386/q35-acpi-dsdt.dep
> +
> iasl-option=$(shell if test -z "`$(1) $(2) 2>&1 > /dev/null`" \
> ; then echo "$(2)"; else echo "$(3)"; fi ;)
>
> ifdef IASL
> #IASL Present. Generate hex files from .dsl
> hw/i386/%.hex: $(SRC_PATH)/hw/i386/%.dsl $(SRC_PATH)/scripts/acpi_extract_preprocess.py $(SRC_PATH)/scripts/acpi_extract.py
> - $(call quiet-command, $(CPP) -x c -P $(QEMU_DGFLAGS) $(QEMU_INCLUDES) $< -o $*.dsl.i.orig, " CPP $(TARGET_DIR)$*.dsl.i.orig")
> + $(call quiet-command, $(CPP) -x c -P $(QEMU_DGFLAGS_GEN) $(QEMU_INCLUDES) $< -o $*.dsl.i.orig, " CPP $(TARGET_DIR)$*.dsl.i.orig")
> $(call quiet-command, $(PYTHON) $(SRC_PATH)/scripts/acpi_extract_preprocess.py $*.dsl.i.orig > $*.dsl.i, " ACPI_PREPROCESS $(TARGET_DIR)$*.dsl.i")
> $(call quiet-command, $(IASL) $(call iasl-option,$(IASL),-Pn,) -vs -l -tc -p $* $*.dsl.i $(if $(V), , > /dev/null) 2>&1 ," IASL $(TARGET_DIR)$*.dsl.i")
> $(call quiet-command, $(PYTHON) $(SRC_PATH)/scripts/acpi_extract.py $*.lst > $*.off, " ACPI_EXTRACT $(TARGET_DIR)$*.off")
> diff --git a/rules.mak b/rules.mak
> index aec27f8..6019a46 100644
> --- a/rules.mak
> +++ b/rules.mak
> @@ -18,6 +18,7 @@ QEMU_CXXFLAGS = -D__STDC_LIMIT_MACROS $(filter-out -Wstrict-prototypes -Wmissing
>
> # Flags for dependency generation
> QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d
> +QEMU_DGFLAGS_GEN += -MMD -MP -MT $@ -MF $(*D)/$(*F).dep
>
> # Same as -I$(SRC_PATH) -I., but for the nested source/object directories
> QEMU_INCLUDES += -I$(<D) -I$(@D)
> --
next prev parent reply other threads:[~2015-08-05 9:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-04 16:21 [Qemu-devel] [PATCH] make: explicit dependencies for ACPI gen sources Victor Kaplansky
2015-08-04 20:34 ` Michael S. Tsirkin
2015-08-04 21:21 ` Peter Maydell
2015-08-04 21:29 ` Michael S. Tsirkin
2015-08-05 9:50 ` Paolo Bonzini [this message]
2015-08-05 13:59 ` Michael S. Tsirkin
2015-08-05 14:28 ` Victor Kaplansky
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=55C1DC7E.3090307@redhat.com \
--to=pbonzini@redhat.com \
--cc=ehabkost@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=victork@redhat.com \
/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).