From: Ian Campbell Subject: Re: [PATCH] tools/vtpm: fix tpm_version.h error during parallel build Date: Tue, 31 Jul 2012 09:34:13 +0100 Message-ID: <1343723653.15432.65.camel@zakaz.uk.xensource.com> References: <870b930e816fab3180c1.1343722356@probook.site> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <870b930e816fab3180c1.1343722356@probook.site> 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: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Tue, 2012-07-31 at 09:12 +0100, Olaf Hering wrote: > # HG changeset patch > # User Olaf Hering > # Date 1343722334 -7200 > # Node ID 870b930e816fab3180c11c5f802e39d0f81458cb > # Parent 71c4c3dd4dfbacbfa1d57af63993eab830c8029a > tools/vtpm: fix tpm_version.h error during parallel build > > Generating the tpm_version.h is not make -j safe: > > In file included from ../tpm/tpm_emulator.h:25:0, > from ../tpm/tpm_startup.c:18: > ../tpm/tpm_version.h:1:0: error: unterminated #ifndef > make[5]: *** [tpm_startup.o] Error 1 > > Fix this by calling the individual make targets because make can not > know that 'all-recursive' depends on 'version'. Is this not trivially expressable in make syntax? > > Signed-off-by: Olaf Hering > > diff -r 71c4c3dd4dfb -r 870b930e816f tools/vtpm/Makefile > --- a/tools/vtpm/Makefile > +++ b/tools/vtpm/Makefile > @@ -23,7 +23,7 @@ build: build_sub > > .PHONY: install > install: build > - $(MAKE) -C $(VTPM_DIR) $@ > + $(MAKE) -C $(VTPM_DIR) install-recursive > > .PHONY: clean > clean: > @@ -66,7 +66,8 @@ updatepatches: clean orig > .PHONY: build_sub > build_sub: $(VTPM_DIR)/tpmd/tpmd > set -e; if [ -e $(GMP_HEADER) ]; then \ > - $(MAKE) -C $(VTPM_DIR); \ > + $(MAKE) -C $(VTPM_DIR) version; \ > + $(MAKE) -C $(VTPM_DIR) all-recursive; \ > else \ > echo "=== Unable to build VTPMs. libgmp could not be found."; \ > fi > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel