Skip to contentSkip to conversation

libxl: test programs: Fix Makefile race

PATCH Superseded Ian Jackson 2 participants 2 messages Feb 6, 2014

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxl: test programs: Fix Makefile race

We need to include the new TEST_PROG_OBJS and LIBXL_TEST_OBJS in the appropriate dependencies. Otherwise we risk trying to build the test program before gentypes is run.

---
 tools/libxl/Makefile |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
tools/libxl/Makefile +4 -3
index 66f3f3f..4af9033 100644
@@ -130,7 +130,7 @@ all: $(CLIENTS) $(TEST_PROGS) \
 	$(AUTOSRCS) $(AUTOINCS)
 
 $(LIBXL_OBJS) $(LIBXLU_OBJS) $(XL_OBJS) $(SAVE_HELPER_OBJS) \
-		$(LIBXL_TEST_OBJS): \
+		$(LIBXL_TEST_OBJS) $(TEST_PROG_OBJS): \
 	$(AUTOINCS) libxl.api-ok
 
 %.c %.h:: %.y
@@ -175,8 +175,9 @@ libxl_internal.h: _libxl_types_internal.h _paths.h
 libxl_internal_json.h: _libxl_types_internal_json.h
 xl.h: _paths.h
 
-$(LIBXL_OBJS) $(LIBXLU_OBJS) $(XL_OBJS) $(SAVE_HELPER_OBJS): libxl.h
-$(LIBXL_OBJS): libxl_internal.h
+$(LIBXL_OBJS) $(LIBXL_TEST_OBJS) $(LIBXLU_OBJS) \
+	$(XL_OBJS) $(TEST_PROG_OBJS) $(SAVE_HELPER_OBJS): libxl.h
+$(LIBXL_OBJS) $(LIBXL_TEST_OBJS): libxl_internal.h
 
 _libxl_type%.h _libxl_type%_json.h _libxl_type%.c: libxl_type%.idl gentypes.py idl.py
 	$(PYTHON) gentypes.py libxl_type$*.idl __libxl_type$*.h __libxl_type$*_json.h __libxl_type$*.c
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 3 lines · Ian Jackson

We need to include the new TEST_PROG_OBJS and LIBXL_TEST_OBJS in the appropriate dependencies. Otherwise we risk trying to build the test program before gentypes is run.

This helps with building. But linking fails, TEST_PROGS lacks a dependency on libxenlight.so

Olaf