|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] tools/vtpm: fix version.h error during parallel build
# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1342105705 -7200
# Node ID 51506c407f3ef3e238a4154c7f72ac61093e0bce
# 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.
(all-recursive needs to depend on version)
Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
diff -r 42f76d536b11 -r 51506c407f3e 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 51506c407f3e tools/vtpm/vtpm-0.5.1-version.h.patch
--- /dev/null
+++ b/tools/vtpm/vtpm-0.5.1-version.h.patch
@@ -0,0 +1,53 @@
+
+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 | 19 +++++++++++--------
+ 1 file changed, 11 insertions(+), 8 deletions(-)
+
+Index: tpm_emulator-0.5.1/Makefile
+===================================================================
+--- tpm_emulator-0.5.1.orig/Makefile
++++ tpm_emulator-0.5.1/Makefile
+@@ -14,20 +14,23 @@ 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
+
+ install: install-recursive
+
+-all-recursive clean-recursive install-recursive:
++all-recursive clean-recursive install-recursive: version
+ @target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $(SUBDIRS); do \
+ echo "Making $$target in $$subdir"; \
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |