[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Adds a check to vtpm_manager and vtpm Makefiles to verify openssl and



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID b21261034a25dc5db5e746387f7c0dd51e6526dc
# Parent  4b89195850398b85cd5a3b57ba8228209f010fd9
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@xxxxxxxxx>

diff -r 4b8919585039 -r b21261034a25 tools/vtpm/Makefile
--- a/tools/vtpm/Makefile       Thu Jan 12 12:20:04 2006
+++ b/tools/vtpm/Makefile       Thu Jan 12 13:27:20 2006
@@ -10,6 +10,8 @@
 
 # Emulator tarball name
 TPM_EMULATOR_TARFILE = tpm_emulator-0.2b.tar.gz
+
+GMP_HEADER = /usr/include/gmp.h
 
 all: build
 
@@ -55,5 +57,12 @@
        patch -p1 <../vtpm.patch
 
 build_sub:
-       $(MAKE) -C $(TPM_EMULATOR_DIR)
-       $(MAKE) -C $(VTPM_DIR)
+       if [ -e $(GMP_HEADER) ]; then \
+               $(MAKE) -C $(VTPM_DIR); \
+               if [ "$(BUILD_EMULATOR)" = "y" ]; then \
+                       $(MAKE) -C $(TPM_EMULATOR_DIR); \
+               fi \
+       else \
+               echo "*** Unable to build VTPMs. libgmp could not be found."; \
+       fi
+
diff -r 4b8919585039 -r b21261034a25 tools/vtpm/Rules.mk
--- a/tools/vtpm/Rules.mk       Thu Jan 12 12:20:04 2006
+++ b/tools/vtpm/Rules.mk       Thu Jan 12 13:27:20 2006
@@ -33,5 +33,7 @@
 
 -include $(DEP_FILES)
 
+BUILD_EMULATOR = n
+
 # Make sure these are just rules
 .PHONY : all build install clean
diff -r 4b8919585039 -r b21261034a25 tools/vtpm_manager/Makefile
--- a/tools/vtpm_manager/Makefile       Thu Jan 12 12:20:04 2006
+++ b/tools/vtpm_manager/Makefile       Thu Jan 12 13:27:20 2006
@@ -4,13 +4,18 @@
 include $(XEN_ROOT)/tools/vtpm_manager/Rules.mk
 
 SUBDIRS                = crypto tcs util manager
+OPENSSL_HEADER = /usr/include/openssl/crypto.h
 
 all: build
 
 build:
-       @set -e; for subdir in $(SUBDIRS); do \
-               $(MAKE) -C $$subdir $@; \
-       done
+       if [ -e $(OPENSSL_HEADER) ]; then \
+               @set -e; for subdir in $(SUBDIRS); do \
+                       $(MAKE) -C $$subdir $@; \
+               done; \
+       else \
+               echo "*** Cannot build vtpm_manager: OpenSSL developement files 
missing."; \
+       fi
 
 install: build
        @set -e; for subdir in $(SUBDIRS); do \

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.