tools/vtpm: fix tpm_version.h error during parallel build
PATCH 1/1 tools/vtpm: fix tpm_version.h error during parallel build
# HG changeset patch
# User Olaf Hering <[email protected]>
# 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'.
tools/vtpm/Makefile +3 -2
@@ -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
Quoted 9 lines · Olaf Hering
# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1343722334 -7200
# Node ID870b930e816fab3180c11c5f802e39d0f81458cb# Parent71c4c3dd4dfbacbfa1d57af63993eab830c8029atools/vtpm: fixtpm_version.herror during parallel buildGenerating the
tpm_version.his not make -j safe:
Quoted 7 lines
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 1Fix 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?
Quoted 30 lines
Signed-off-by Olaf Hering <[email protected]>diff -r
71c4c3dd4dfb-r870b930e816ftools/vtpm/Makefiletools/vtpm/Makefile +3
-2@@ -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
[email protected]
http://lists.xen.org/xen-devel
Quoted 15 lines · Ian Campbell
Quoted 14 lines · Olaf Hering
# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1343722334 -7200
# Node ID870b930e816fab3180c11c5f802e39d0f81458cb# Parent71c4c3dd4dfbacbfa1d57af63993eab830c8029atools/vtpm: fixtpm_version.herror during parallel buildGenerating the
tpm_version.his 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
Quoted 4 lines
Quoted 2 lines
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.
Quoted 38 lines
Quoted 27 lines
Signed-off-by Olaf Hering <[email protected]>diff -r
71c4c3dd4dfb-r870b930e816ftools/vtpm/Makefiletools/vtpm/Makefile +3
-2@@ -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."; \ fiQuoted 4 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 5 lines · Ian Campbell
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