[PATCH][4.15?] libxl/ACPI: add missing build dependency

Jan Beulich posted 1 patch 3 years ago
Test gitlab-ci failed
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/dcba50ca-59da-b7e8-f60a-7efd8ecd052e@suse.com
[PATCH][4.15?] libxl/ACPI: add missing build dependency
Posted by Jan Beulich 3 years ago
Just like all other object files - wherever *.o is mentioned, *.opic
also needs mentioning to yield consistent behavior. Otherwise make may
decide to (re)build the object before recursion into $(ACPI_PATH)/ (to
update $(DSDT_FILES-y) and ssdt_*.h) was actually finished.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
A related but separate issue is that build.o* get rebuilt even if none
of their file dependencies changed, merely - aiui - because of their
dependency on the phony "acpi" target. It may be possible to limit this
rebuilding by making both depend on $(DSDT_FILES-y) instead, but then
they would still get rebuilt for no reason when that file (if any)
changed (but ssdt_*.h didn't).

--- a/tools/libs/light/Makefile
+++ b/tools/libs/light/Makefile
@@ -32,7 +32,7 @@ ACPI_PATH  = $(XEN_ROOT)/tools/libacpi
 DSDT_FILES-$(CONFIG_X86) = dsdt_pvh.c
 ACPI_OBJS  = $(patsubst %.c,%.o,$(DSDT_FILES-y)) build.o static_tables.o
 ACPI_PIC_OBJS = $(patsubst %.o,%.opic,$(ACPI_OBJS))
-$(DSDT_FILES-y) build.o: acpi
+$(DSDT_FILES-y) build.o build.opic: acpi
 vpath build.c $(ACPI_PATH)/
 vpath static_tables.c $(ACPI_PATH)/
 

Re: [PATCH][4.15?] libxl/ACPI: add missing build dependency
Posted by Andrew Cooper 3 years ago
On 05/03/2021 16:28, Jan Beulich wrote:
> Just like all other object files - wherever *.o is mentioned, *.opic
> also needs mentioning to yield consistent behavior. Otherwise make may
> decide to (re)build the object before recursion into $(ACPI_PATH)/ (to
> update $(DSDT_FILES-y) and ssdt_*.h) was actually finished.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>


Re: [PATCH][4.15?] libxl/ACPI: add missing build dependency
Posted by Ian Jackson 3 years ago
Jan Beulich writes ("[PATCH][4.15?] libxl/ACPI: add missing build dependency"):
> Just like all other object files - wherever *.o is mentioned, *.opic
> also needs mentioning to yield consistent behavior. Otherwise make may
> decide to (re)build the object before recursion into $(ACPI_PATH)/ (to
> update $(DSDT_FILES-y) and ssdt_*.h) was actually finished.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Release-Acked-by: Ian Jackson <iwj@xenproject.org>