ia64/xen-unstable
changeset 8578:b21261034a25
Adds a check to vtpm_manager and vtpm Makefiles to verify openssl and
gmp dev files are installed. If files are missing, Makefile exits with a
message indicating that these tools will not be built, rather than an
error, which prevents Xen from building.
Signed-off-by: Vinnie Scarlata <vincent.r.scarlata@intel.com>
gmp dev files are installed. If files are missing, Makefile exits with a
message indicating that these tools will not be built, rather than an
error, which prevents Xen from building.
Signed-off-by: Vinnie Scarlata <vincent.r.scarlata@intel.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Thu Jan 12 14:27:20 2006 +0100 (2006-01-12) |
parents | 4b8919585039 |
children | bfcdf4099d23 |
files | tools/vtpm/Makefile tools/vtpm/Rules.mk tools/vtpm_manager/Makefile |
line diff
1.1 --- a/tools/vtpm/Makefile Thu Jan 12 13:20:04 2006 +0100 1.2 +++ b/tools/vtpm/Makefile Thu Jan 12 14:27:20 2006 +0100 1.3 @@ -11,6 +11,8 @@ VTPM_DIR = vtpm 1.4 # Emulator tarball name 1.5 TPM_EMULATOR_TARFILE = tpm_emulator-0.2b.tar.gz 1.6 1.7 +GMP_HEADER = /usr/include/gmp.h 1.8 + 1.9 all: build 1.10 1.11 build: $(TPM_EMULATOR_DIR) $(VTPM_DIR) build_sub 1.12 @@ -55,5 +57,12 @@ mrproper: 1.13 patch -p1 <../vtpm.patch 1.14 1.15 build_sub: 1.16 - $(MAKE) -C $(TPM_EMULATOR_DIR) 1.17 - $(MAKE) -C $(VTPM_DIR) 1.18 + if [ -e $(GMP_HEADER) ]; then \ 1.19 + $(MAKE) -C $(VTPM_DIR); \ 1.20 + if [ "$(BUILD_EMULATOR)" = "y" ]; then \ 1.21 + $(MAKE) -C $(TPM_EMULATOR_DIR); \ 1.22 + fi \ 1.23 + else \ 1.24 + echo "*** Unable to build VTPMs. libgmp could not be found."; \ 1.25 + fi 1.26 +
2.1 --- a/tools/vtpm/Rules.mk Thu Jan 12 13:20:04 2006 +0100 2.2 +++ b/tools/vtpm/Rules.mk Thu Jan 12 14:27:20 2006 +0100 2.3 @@ -33,5 +33,7 @@ OBJS = $(patsubst %.c,%.o,$(SRCS)) 2.4 2.5 -include $(DEP_FILES) 2.6 2.7 +BUILD_EMULATOR = n 2.8 + 2.9 # Make sure these are just rules 2.10 .PHONY : all build install clean
3.1 --- a/tools/vtpm_manager/Makefile Thu Jan 12 13:20:04 2006 +0100 3.2 +++ b/tools/vtpm_manager/Makefile Thu Jan 12 14:27:20 2006 +0100 3.3 @@ -4,13 +4,18 @@ XEN_ROOT = ../.. 3.4 include $(XEN_ROOT)/tools/vtpm_manager/Rules.mk 3.5 3.6 SUBDIRS = crypto tcs util manager 3.7 +OPENSSL_HEADER = /usr/include/openssl/crypto.h 3.8 3.9 all: build 3.10 3.11 build: 3.12 - @set -e; for subdir in $(SUBDIRS); do \ 3.13 - $(MAKE) -C $$subdir $@; \ 3.14 - done 3.15 + if [ -e $(OPENSSL_HEADER) ]; then \ 3.16 + @set -e; for subdir in $(SUBDIRS); do \ 3.17 + $(MAKE) -C $$subdir $@; \ 3.18 + done; \ 3.19 + else \ 3.20 + echo "*** Cannot build vtpm_manager: OpenSSL developement files missing."; \ 3.21 + fi 3.22 3.23 install: build 3.24 @set -e; for subdir in $(SUBDIRS); do \