From: Ian Jackson Subject: [PATCH] libxl: Fix missing dependency in api check rule Date: Tue, 11 Sep 2012 15:35:04 +0100 Message-ID: <20559.19480.717230.760237@mariner.uk.xensource.com> References: <1347007260.30018.39.camel@zakaz.uk.xensource.com> <20553.52602.892916.502689@mariner.uk.xensource.com> <20120907132824.GA18208@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120907132824.GA18208@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Olaf Hering Cc: Ian Campbell , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Olaf Hering writes ("Re: [Xen-devel] [PATCH] libxl: add missing dependencies of libxl.h"): > On Fri, Sep 07, Ian Jackson wrote: > > -_%.api-for-check: %.h > > +_%.api-for-check: %.h $(filter-out %.api-ok, $(AUTOINCS)) > > $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_$*.o) -c -E $< $(APPEND_CFLAGS) \ > > -DLIBXL_EXTERNAL_CALLERS_ONLY=LIBXL_EXTERNAL_CALLERS_ONLY \ > > >$@.new > > > > Can you confirm that this fixes it for you ? > > The package builds fine with this change. > The failure if fixes happend only once. Hmm. Adding this: (WARNING DO NOT APPLY THIS BIT) diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile index a9d9ec6..5f2332c 100644 --- a/tools/libxl/Makefile +++ b/tools/libxl/Makefile @@ -132,6 +132,7 @@ _paths.h: genpath _libxl_list.h: $(XEN_INCLUDE)/xen-external/bsd-sys-queue-h-seddery $(XEN_INCLUDE)/xen-external/bsd-sys-queue.h $(PERL) $^ --prefix=libxl >$@.new + sleep 10 $(call move-if-changed,$@.new,$@) _libxl_save_msgs_helper.c _libxl_save_msgs_callout.c \ allowed me to repro the failure and confirm that my proposed change fixes it. So (for -unstable and 4.2), the fix is below. Ian. Subject: [PATCH] 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 filter out the api-ok file from AUTOINCS to avoid a circular dependency. The result is that the api check is the last thing to be done before make considers the AUTOINCS all done and can start work on compiling .c files into .o's. Reported-by: Olaf Hering Signed-off-by: Ian Jackson diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile index 5f2332c..c298e97 100644 --- a/tools/libxl/Makefile +++ b/tools/libxl/Makefile @@ -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 $(filter-out %.api-ok, $(AUTOINCS)) $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_$*.o) -c -E $< $(APPEND_CFLAGS) \ -DLIBXL_EXTERNAL_CALLERS_ONLY=LIBXL_EXTERNAL_CALLERS_ONLY \ >$@.new