xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: xen-devel@lists.xensource.com
Subject: [PATCH] tools/vtpm: fix version.h error during parallel build
Date: Thu, 12 Jul 2012 09:51:56 +0200	[thread overview]
Message-ID: <02ec826cab1e4acb25b3.1342079516@probook.site> (raw)

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1342079491 -7200
# Node ID 02ec826cab1e4acb25b364a180a1597ace1149f9
# Parent  42f76d536b116d2ebad1b6705ae51ecd171d2581
tools/vtpm: fix 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

Add another patch which adds proper dependencies in the tpm_manager Makefile.

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

diff -r 42f76d536b11 -r 02ec826cab1e tools/vtpm/Makefile
--- a/tools/vtpm/Makefile
+++ b/tools/vtpm/Makefile
@@ -51,7 +51,8 @@ mrproper:
 
 	set -e; cd $(VTPM_DIR); \
 	patch -p1 < ../vtpm-0.5.1.patch; \
-	patch -p1 < ../vtpm-0.5.1-LDLIBS.patch
+	patch -p1 < ../vtpm-0.5.1-LDLIBS.patch; \
+	patch -p1 < ../vtpm-0.5.1-version.h.patch
 
 orig: $(TPM_EMULATOR_TARFILE)
 	mkdir $(ORIG_DIR);
diff -r 42f76d536b11 -r 02ec826cab1e tools/vtpm/vtpm-0.5.1-version.h.patch
--- /dev/null
+++ b/tools/vtpm/vtpm-0.5.1-version.h.patch
@@ -0,0 +1,45 @@
+
+make[4]: Entering directory `/usr/src/packages/BUILD/xen-4.2.25602/non-dbg/tools/vtpm/vtpm'
+Making all in tpmd
+make[5]: Entering directory `/usr/src/packages/BUILD/xen-4.2.25602/non-dbg/tools/vtpm/vtpm/tpmd'
+gcc -Wall -Wno-unused -Wpointer-arith -Wcast-align -Wwrite-strings -Wsign-compare -Wno-multichar -g -I.. -I. -O2 -fno-strict-aliasing -I../../../../tools/vtpm_manager/manager   -c -o tpm_data.o ../tpm/tpm_data.c
+gcc -Wall -Wno-unused -Wpointer-arith -Wcast-align -Wwrite-strings -Wsign-compare -Wno-multichar -g -I.. -I. -O2 -fno-strict-aliasing -I../../../../tools/vtpm_manager/manager   -c -o tpm_startup.o ../tpm/tpm_startup.c
+gcc -Wall -Wno-unused -Wpointer-arith -Wcast-align -Wwrite-strings -Wsign-compare -Wno-multichar -g -I.. -I. -O2 -fno-strict-aliasing -I../../../../tools/vtpm_manager/manager   -c -o tpm_storage.o ../tpm/tpm_storage.c
+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
+gcc -Wall -Wno-unused -Wpointer-arith -Wcast-align -Wwrite-strings -Wsign-compare -Wno-multichar -g -I.. -I. -O2 -fno-strict-aliasing -I../../../../tools/vtpm_manager/manager   -c -o tpm_credentials.o ../tpm/tpm_credentials.c
+make[5]: *** [tpm_startup.o] Error 1
+
+---
+ Makefile |   17 ++++++++++-------
+ 1 file changed, 10 insertions(+), 7 deletions(-)
+
+Index: tpm_emulator-0.5.1/Makefile
+===================================================================
+--- tpm_emulator-0.5.1.orig/Makefile
++++ tpm_emulator-0.5.1/Makefile
+@@ -14,13 +14,16 @@ SUBDIRS := tpmd
+ 
+ all: version all-recursive
+ 
+-version:
+-	@echo "#ifndef _TPM_VERSION_H_" > tpm/tpm_version.h
+-	@echo "#define _TPM_VERSION_H_" >> tpm/tpm_version.h
+-	@echo "#define VERSION_MAJOR $(VERSION_MAJOR)" >> tpm/tpm_version.h
+-	@echo "#define VERSION_MINOR $(VERSION_MINOR)" >> tpm/tpm_version.h
+-	@echo "#define VERSION_BUILD $(VERSION_BUILD)" >> tpm/tpm_version.h
+-	@echo "#endif /* _TPM_VERSION_H_ */" >> tpm/tpm_version.h
++tpm/tpm_version.h:
++	@echo "#ifndef _TPM_VERSION_H_" > tpm/tpm_version.h.tmp
++	@echo "#define _TPM_VERSION_H_" >> tpm/tpm_version.h.tmp
++	@echo "#define VERSION_MAJOR $(VERSION_MAJOR)" >> tpm/tpm_version.h.tmp
++	@echo "#define VERSION_MINOR $(VERSION_MINOR)" >> tpm/tpm_version.h.tmp
++	@echo "#define VERSION_BUILD $(VERSION_BUILD)" >> tpm/tpm_version.h.tmp
++	@echo "#endif /* _TPM_VERSION_H_ */" >> tpm/tpm_version.h.tmp
++	mv -f tpm/tpm_version.h.tmp tpm/tpm_version.h
++
++version: tpm/tpm_version.h
+ 
+ clean: clean-recursive
+ 	rm -f tpm/tpm_version.h

             reply	other threads:[~2012-07-12  7:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-12  7:51 Olaf Hering [this message]
2012-07-12 15:07 ` [PATCH] tools/vtpm: fix version.h error during parallel build Olaf Hering
  -- strict thread matches above, loose matches on Subject: below --
2012-07-12 15:08 Olaf Hering
2012-07-23 16:54 ` Ian Jackson
2012-07-23 17:12   ` Olaf Hering
2012-07-23 17:14     ` Ian Jackson
2012-07-31  8:19       ` Olaf Hering

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=02ec826cab1e4acb25b3.1342079516@probook.site \
    --to=olaf@aepfle.de \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).