xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools/vtpm: fix tpm_version.h error during parallel build
@ 2012-07-31  8:12 Olaf Hering
  2012-07-31  8:34 ` Ian Campbell
  0 siblings, 1 reply; 6+ messages in thread
From: Olaf Hering @ 2012-07-31  8:12 UTC (permalink / raw)
  To: xen-devel

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# 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'.

Signed-off-by: Olaf Hering <olaf@aepfle.de>

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] tools/vtpm: fix tpm_version.h error during parallel build
  2012-07-31  8:12 [PATCH] tools/vtpm: fix tpm_version.h error during parallel build Olaf Hering
@ 2012-07-31  8:34 ` Ian Campbell
  2012-07-31  8:42   ` Ian Campbell
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2012-07-31  8:34 UTC (permalink / raw)
  To: Olaf Hering; +Cc: xen-devel@lists.xen.org

On Tue, 2012-07-31 at 09:12 +0100, Olaf Hering wrote:
> # HG changeset patch
> # User Olaf Hering <olaf@aepfle.de>
> # 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 <olaf@aepfle.de>
> 
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] tools/vtpm: fix tpm_version.h error during parallel build
  2012-07-31  8:34 ` Ian Campbell
@ 2012-07-31  8:42   ` Ian Campbell
  2012-08-02 15:54     ` Olaf Hering
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2012-07-31  8:42 UTC (permalink / raw)
  To: Olaf Hering; +Cc: xen-devel@lists.xen.org

On Tue, 2012-07-31 at 09:34 +0100, Ian Campbell wrote:
> On Tue, 2012-07-31 at 09:12 +0100, Olaf Hering wrote:
> > # HG changeset patch
> > # User Olaf Hering <olaf@aepfle.de>
> > # 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?

I've just seen the original thread which points out that fixing this in
that way requires patching the downloaded source while this solution
requires only that we patch our own Makefile.

It would have been useful to note this in the commit message.

> 
> > 
> > Signed-off-by: Olaf Hering <olaf@aepfle.de>
> > 
> > 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
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] tools/vtpm: fix tpm_version.h error during parallel build
@ 2012-08-02 15:53 Olaf Hering
  2012-08-03  8:55 ` Ian Campbell
  0 siblings, 1 reply; 6+ messages in thread
From: Olaf Hering @ 2012-08-02 15:53 UTC (permalink / raw)
  To: xen-devel

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1343922758 -7200
# Node ID 756f87bda3c3172d34cab60dc7279c3292775275
# Parent  983ea7521badb3e05d3379044fb283732ef558d6
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

This happens because make can not know that 'all-recursive' depends on
'version'. Fix this by calling the individual make targets. Doing it
this way avoids adding yet another patch.

Signed-off-by: Olaf Hering <olaf@aepfle.de>

diff -r 983ea7521bad -r 756f87bda3c3 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] tools/vtpm: fix tpm_version.h error during parallel build
  2012-07-31  8:42   ` Ian Campbell
@ 2012-08-02 15:54     ` Olaf Hering
  0 siblings, 0 replies; 6+ messages in thread
From: Olaf Hering @ 2012-08-02 15:54 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel@lists.xen.org

On Tue, Jul 31, Ian Campbell wrote:

> I've just seen the original thread which points out that fixing this in
> that way requires patching the downloaded source while this solution
> requires only that we patch our own Makefile.
> 
> It would have been useful to note this in the commit message.

I just sent another version with updated commit message.

Olaf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] tools/vtpm: fix tpm_version.h error during parallel build
  2012-08-02 15:53 Olaf Hering
@ 2012-08-03  8:55 ` Ian Campbell
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Campbell @ 2012-08-03  8:55 UTC (permalink / raw)
  To: Olaf Hering; +Cc: xen-devel@lists.xen.org

On Thu, 2012-08-02 at 16:53 +0100, Olaf Hering wrote:
> # HG changeset patch
> # User Olaf Hering <olaf@aepfle.de>
> # Date 1343922758 -7200
> # Node ID 756f87bda3c3172d34cab60dc7279c3292775275
> # Parent  983ea7521badb3e05d3379044fb283732ef558d6
> 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
> 
> This happens because make can not know that 'all-recursive' depends on
> 'version'. Fix this by calling the individual make targets. Doing it
> this way avoids adding yet another patch.
> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>

Acked-by: Ian Campbell <ian.campbell@citrix.com>

Applied.

I made the last paragraph:
        This happens because make can not know that 'all-recursive' depends on
        'version'. Fix this by calling the individual make targets.
        Doing it
        this way avoids adding yet another patch to the downloaded
        source.

(i.e. gave some hint why we want to avoid patching)

> 
> diff -r 983ea7521bad -r 756f87bda3c3 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-08-03  8:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-31  8:12 [PATCH] tools/vtpm: fix tpm_version.h error during parallel build Olaf Hering
2012-07-31  8:34 ` Ian Campbell
2012-07-31  8:42   ` Ian Campbell
2012-08-02 15:54     ` Olaf Hering
  -- strict thread matches above, loose matches on Subject: below --
2012-08-02 15:53 Olaf Hering
2012-08-03  8:55 ` Ian Campbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).