Makefile.objs: add dummy rule for .dsl files
PATCH 1/1 Makefile.objs: add dummy rule for .dsl files
.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.
--- hw/i386/Makefile.objs | 1 + 1 file changed, 1 insertion(+)
hw/i386/Makefile.objs +1 -0
@@ -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")
Signature · 1 line
MST
Paolo Bonzini
AppliedQuoted 22 lines · Michael S. Tsirkin
.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 <[email protected]>Signed-off-by Michael S. Tsirkin <[email protected]>--- hw/i386/Makefile.objs | 1 + 1 file changed, 1 insertion(+)hw/i386/Makefile.objs +0
-0
hw/i386/Makefile.objs iasl-option=$(shell if test -z "`$(1) $(2) 2>&1 > /dev/null`" \ · line 25
Quoted 7 lines
hw/i386/Makefile.objs +1
-0@@ -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
Quoted 35 lines · Paolo Bonzini
Quoted 22 lines · Michael S. Tsirkin
.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 <[email protected]>Signed-off-by Michael S. Tsirkin <[email protected]>--- hw/i386/Makefile.objs | 1 + 1 file changed, 1 insertion(+)hw/i386/Makefile.objs +0
-0hw/i386/Makefile.objs iasl-option=$(shell if test -z "`$(1) $(2) 2>&1 > /dev/null`" \ · line 25
Quoted 7 lines
hw/i386/Makefile.objs +1
-0@@ -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.
Quoted 1 line
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.
Signature · 1 line
MST
Quoted 7 lines · Michael S. Tsirkin
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