* [Qemu-devel] [PATCH] Makefile.objs: add dummy rule for .dsl files
@ 2015-02-26 16:33 Michael S. Tsirkin
2015-02-27 18:41 ` Paolo Bonzini
0 siblings, 1 reply; 4+ messages in thread
From: Michael S. Tsirkin @ 2015-02-26 16:33 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Richard Henderson, Anthony Liguori, Paolo Bonzini
.hex files are created from .dsl files, so
cpp adds the dependency %.hex: %.dsl automatically,
but fails to add a dummy rule so if .dsl
file is missing, make will fail.
This happened to us in the past when we
removed some dsl files.
Create an extra .d file with a dummy dependency.
Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/i386/Makefile.objs | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
index 45b90a8..7a47914 100644
--- a/hw/i386/Makefile.objs
+++ b/hw/i386/Makefile.objs
@@ -19,6 +19,7 @@ iasl-option=$(shell if test -z "`$(1) $(2) 2>&1 > /dev/null`" \
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, echo "$<:" > "$@"-extra.d, " DEP $@")
$(call quiet-command, $(CPP) -x c -P $(QEMU_DGFLAGS) $(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")
--
MST
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] Makefile.objs: add dummy rule for .dsl files
2015-02-26 16:33 [Qemu-devel] [PATCH] Makefile.objs: add dummy rule for .dsl files Michael S. Tsirkin
@ 2015-02-27 18:41 ` Paolo Bonzini
2015-03-01 16:50 ` Michael S. Tsirkin
0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2015-02-27 18:41 UTC (permalink / raw)
To: Michael S. Tsirkin, qemu-devel
Cc: Peter Maydell, Anthony Liguori, Richard Henderson
On 26/02/2015 17:33, Michael S. Tsirkin wrote:
> .hex files are created from .dsl files, so
> cpp adds the dependency %.hex: %.dsl automatically,
> but fails to add a dummy rule so if .dsl
> file is missing, make will fail.
>
> This happened to us in the past when we
> removed some dsl files.
>
> Create an extra .d file with a dummy dependency.
>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> hw/i386/Makefile.objs | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
> index 45b90a8..7a47914 100644
> --- a/hw/i386/Makefile.objs
> +++ b/hw/i386/Makefile.objs
> @@ -19,6 +19,7 @@ iasl-option=$(shell if test -z "`$(1) $(2) 2>&1 > /dev/null`" \
> 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, echo "$<:" > "$@"-extra.d, " DEP $@")
> $(call quiet-command, $(CPP) -x c -P $(QEMU_DGFLAGS) $(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")
>
Applied, thanks.
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] Makefile.objs: add dummy rule for .dsl files
2015-02-27 18:41 ` Paolo Bonzini
@ 2015-03-01 16:50 ` Michael S. Tsirkin
2015-03-02 10:23 ` Paolo Bonzini
0 siblings, 1 reply; 4+ messages in thread
From: Michael S. Tsirkin @ 2015-03-01 16:50 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Peter Maydell, qemu-devel, Anthony Liguori, Richard Henderson
On Fri, Feb 27, 2015 at 07:41:29PM +0100, Paolo Bonzini wrote:
>
>
> On 26/02/2015 17:33, Michael S. Tsirkin wrote:
> > .hex files are created from .dsl files, so
> > cpp adds the dependency %.hex: %.dsl automatically,
> > but fails to add a dummy rule so if .dsl
> > file is missing, make will fail.
> >
> > This happened to us in the past when we
> > removed some dsl files.
> >
> > Create an extra .d file with a dummy dependency.
> >
> > Cc: Peter Maydell <peter.maydell@linaro.org>
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> > hw/i386/Makefile.objs | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
> > index 45b90a8..7a47914 100644
> > --- a/hw/i386/Makefile.objs
> > +++ b/hw/i386/Makefile.objs
> > @@ -19,6 +19,7 @@ iasl-option=$(shell if test -z "`$(1) $(2) 2>&1 > /dev/null`" \
> > 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, echo "$<:" > "$@"-extra.d, " DEP $@")
> > $(call quiet-command, $(CPP) -x c -P $(QEMU_DGFLAGS) $(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")
> >
>
> Applied, thanks.
>
> Paolo
Hmm, it turns out while this helps sometimes,
sometimes this results in a hard to debug error
as we try to run preprocessor on the non-existent .dsl.
If not too late, I suggest you drop this one for now.
If too late, probably not worth reverting.
--
MST
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] Makefile.objs: add dummy rule for .dsl files
2015-03-01 16:50 ` Michael S. Tsirkin
@ 2015-03-02 10:23 ` Paolo Bonzini
0 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2015-03-02 10:23 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Peter Maydell, qemu-devel, Anthony Liguori, Richard Henderson
On 01/03/2015 17:50, Michael S. Tsirkin wrote:
> Hmm, it turns out while this helps sometimes,
> sometimes this results in a hard to debug error
> as we try to run preprocessor on the non-existent .dsl.
>
> If not too late, I suggest you drop this one for now.
> If too late, probably not worth reverting.
>
Okay, dropped.
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-02 10:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-26 16:33 [Qemu-devel] [PATCH] Makefile.objs: add dummy rule for .dsl files Michael S. Tsirkin
2015-02-27 18:41 ` Paolo Bonzini
2015-03-01 16:50 ` Michael S. Tsirkin
2015-03-02 10:23 ` Paolo Bonzini
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).