Olaf Hering
2012-Mar-14 19:02 UTC
[PATCH] tools/vtpm: do not install if vtpm can not be build
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1331751709 -3600 # Node ID eed3dbadeb151d9d93cf2b041aa63b9bacd1e4ad # Parent db4b70a33865e2fe77584c67d7d7644045ddf4ca tools/vtpm: do not install if vtpm can not be build A simple ''make tools'' fails in vtpm because there is also a ''make install'' during make tools. vtpm checks only in the build target wether it can be built at all, but the check is missing in the install target as well. Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r db4b70a33865 -r eed3dbadeb15 tools/vtpm/Makefile --- a/tools/vtpm/Makefile +++ b/tools/vtpm/Makefile @@ -23,7 +23,11 @@ build: build_sub .PHONY: install install: build - $(MAKE) -C $(VTPM_DIR) $@ + set -e; if [ -e $(GMP_HEADER) ]; then \ + $(MAKE) -C $(VTPM_DIR) $@; \ + else \ + echo "=== Unable to build VTPMs. libgmp could not be found."; \ + fi .PHONY: clean clean:
Ian Jackson
2012-Apr-03 14:56 UTC
Re: [PATCH] tools/vtpm: do not install if vtpm can not be build
Olaf Hering writes ("[Xen-devel] [PATCH] tools/vtpm: do not install if vtpm can not be build"):> tools/vtpm: do not install if vtpm can not be build > > A simple ''make tools'' fails in vtpm because there is also a ''make install'' > during make tools. vtpm checks only in the build target wether it can be > built at all, but the check is missing in the install target as well.Thanks. I have two comments: firstly, I think it would be best to avoid repeating the test in the install rule. If necessary you can use a make variable to contain the runes. But my second comment is: shouldn''t this kind of test be done with autoconf nowadays ? Ian.
Olaf Hering
2012-Apr-03 15:01 UTC
Re: [PATCH] tools/vtpm: do not install if vtpm can not be build
On Tue, Apr 03, Ian Jackson wrote:> But my second comment is: shouldn''t this kind of test be done with > autoconf nowadays ?Yes, that was my thinking as well after poking around some more in the vtpm subdirectory. The header check for example can be done with autoconf. Since I more or less enabled vtpm by accident, and currently lack the time to get this in shape for the 4.2 release, please drop this patch. I will look at this later. Olaf