summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorOliver Tappe2006-10-14 13:28:25 +0200
committerOliver Tappe2006-10-14 13:28:25 +0200
commitb24eaff1bfded58dab4e2cb3a8dfde73a7a72f51 (patch)
treed1c409bb02bbfd760492846e51430f6180c62658 /Makefile
parentHardware "database" files updated, enabled multicast for dnbd use ... (diff)
downloadcore-b24eaff1bfded58dab4e2cb3a8dfde73a7a72f51.tar.gz
core-b24eaff1bfded58dab4e2cb3a8dfde73a7a72f51.tar.xz
core-b24eaff1bfded58dab4e2cb3a8dfde73a7a72f51.zip
* added check for requireed perl-modules before the installation process.
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@458 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 0a39934a..40241dc2 100644
--- a/Makefile
+++ b/Makefile
@@ -48,6 +48,10 @@ ifeq ($(SLX_TEMP_PATH),)
SLX_TEMP_PATH = /tmp
endif
+ifeq ($(SLX_INSTALL_LOG),)
+ SLX_INSTALL_LOG = install.log
+endif
+
tarball:
@OPENSLX_SVN_SNAPSHOT=$$( echo $${OPENSLX_SVN_SNAPSHOT} | \
tr [:upper:] [:lower:]); \
@@ -79,6 +83,28 @@ tarball:
popd >/dev/null
install:
+ @echo "Checking installation requirements..."; \
+ echo $$(date) >${SLX_INSTALL_LOG}; \
+ if ! perl -e '$$x=2' 2>>${SLX_INSTALL_LOG} ; then \
+ echo " Perl is required, please install it."; \
+ exit 1; \
+ fi; \
+ # many of the following modules are part of core perl, but we check \
+ # for them just to be sure... \
+ for m in Carp DBI Fcntl FindBin Getopt::Long Pod::Usage ; do \
+ if ! perl -e "use $$m" 2>>${SLX_INSTALL_LOG} ; then \
+ echo " The perl-module '$$m' is required, please install it."; \
+ exit 1; \
+ fi; \
+ done; \
+ # specific database modules are optional, but we tell the user if \
+ # support for a database is missing: \
+ for m in CSV mysql SQLite; do \
+ if ! perl -e "use DBD::$$m" 2>>${SLX_INSTALL_LOG} ; then \
+ echo -e " 'DBD::$$m' not found, so $$m-databases will not be\
+supported."; \
+ fi; \
+ done;
@echo "Installing OpenSLX project files"
@mkdir -p $(SLX_CONFIG_PATH) \
-p $(SLX_BASE_PATH)/lib \