aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Jackson <Ian.Jackson@eu.citrix.com>2012-10-26 16:40:44 +0100
committerIan Jackson <Ian.Jackson@eu.citrix.com>2012-10-26 16:40:44 +0100
commit288b0273f27fb53cd9873b09dd33741d1455f128 (patch)
treeb7ff3ff030f6c8ca5e1db96817b7d628cf464ae8
parent2d246bfea1aa9acc59ca493777d408292a4247f5 (diff)
downloadxen-288b0273f27fb53cd9873b09dd33741d1455f128.tar.gz
xen-288b0273f27fb53cd9873b09dd33741d1455f128.tar.bz2
xen-288b0273f27fb53cd9873b09dd33741d1455f128.zip
libxl: Fix missing dependency in api check rule
Without this, the api check cpp run might happen before the various autogenerated files which are #include by libxl.h are ready. We need to remove the api-ok file from AUTOINCS to avoid a circular dependency. Instead, we list it explicitly as a dependency of the object files. The result is that the api check is the last thing to be done before make considers the preparation done and can start work on compiling .c files into .o's. Reported-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Tested-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com> xen-unstable changeset: 25901:c51229d1522e Backport-requested-by: Ian Campbell <Ian.Campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
-rw-r--r--tools/libxl/Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index fc18a80903..0b780c088b 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -74,8 +74,7 @@ LIBXL_OBJS += _libxl_types.o libxl_flask.o _libxl_types_internal.o
$(LIBXL_OBJS): CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore) $(CFLAGS_libblktapctl) -include $(XEN_ROOT)/tools/config.h
AUTOINCS= libxlu_cfg_y.h libxlu_cfg_l.h _libxl_list.h _paths.h \
- _libxl_save_msgs_callout.h _libxl_save_msgs_helper.h \
- libxl.api-ok
+ _libxl_save_msgs_callout.h _libxl_save_msgs_helper.h
AUTOSRCS= libxlu_cfg_y.c libxlu_cfg_l.c
AUTOSRCS += _libxl_save_msgs_callout.c _libxl_save_msgs_helper.c
LIBXLU_OBJS = libxlu_cfg_y.o libxlu_cfg_l.o libxlu_cfg.o \
@@ -102,7 +101,8 @@ testidl.c: libxl_types.idl gentest.py libxl.h $(AUTOINCS)
all: $(CLIENTS) libxenlight.so libxenlight.a libxlutil.so libxlutil.a \
$(AUTOSRCS) $(AUTOINCS)
-$(LIBXL_OBJS) $(LIBXLU_OBJS) $(XL_OBJS) $(SAVE_HELPER_OBJS): $(AUTOINCS)
+$(LIBXL_OBJS) $(LIBXLU_OBJS) $(XL_OBJS) $(SAVE_HELPER_OBJS): \
+ $(AUTOINCS) libxl.api-ok
%.c %.h:: %.y
@rm -f $*.[ch]
@@ -119,7 +119,7 @@ libxl.api-ok: check-libxl-api-rules _libxl.api-for-check
$(PERL) $^
touch $@
-_%.api-for-check: %.h
+_%.api-for-check: %.h $(AUTOINCS)
$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_$*.o) -c -E $< $(APPEND_CFLAGS) \
-DLIBXL_EXTERNAL_CALLERS_ONLY=LIBXL_EXTERNAL_CALLERS_ONLY \
>$@.new