Make may not have copied "_libxl_types_json.h" into $(XEN_INCLUDE) before starting to build the different objects.
Make sure that the generated headers are copied into $(XEN_INCLUDE) before using them. This is achieved by telling make about which headers are needed to use "libxl_internal.h" which use "libxl_json.h" which uses "_libxl_types_json.h". "libxl_internal.h" also uses "libxl.h" so add it to the list. This also prevent `gcc` from using a potentially installed headers from a previous version of Xen. Signed-off-by: Anthony PERARD <anthony.per...@citrix.com> --- This is part of in review patch "libs/light: Rework targets prerequisites", but that much smaller patch should be enough to fix potential build issues. This patch fix for example `make _libxl_types.o`, when libxl generated headers aren't generated yet, and tools/light is clean. For 4.17: build fix. --- tools/libs/light/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/libs/light/Makefile b/tools/libs/light/Makefile index d681269229..374be1cfab 100644 --- a/tools/libs/light/Makefile +++ b/tools/libs/light/Makefile @@ -209,6 +209,7 @@ _libxl_save_msgs_helper.h _libxl_save_msgs_callout.h: \ $(XEN_INCLUDE)/libxl.h: $(XEN_INCLUDE)/_libxl_types.h $(XEN_INCLUDE)/libxl_json.h: $(XEN_INCLUDE)/_libxl_types_json.h +libxl_internal.h: $(XEN_INCLUDE)/libxl.h $(XEN_INCLUDE)/libxl_json.h libxl_internal.h: _libxl_types_internal.h _libxl_types_private.h _libxl_types_internal_private.h libxl_internal_json.h: _libxl_types_internal_json.h -- Anthony PERARD