From 220450357028d0e33eecc0eac13300f675036b87 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Mon, 10 Mar 2008 10:38:07 +0000 Subject: [PATCH] psblas2: Makefile README mkdir.sh Fixed install target in makefile. --- Makefile | 4 ++-- README | 3 +++ mkdir.sh | 20 ++++++++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100755 mkdir.sh diff --git a/Makefile b/Makefile index 3c51bdcf..ac9745ce 100644 --- a/Makefile +++ b/Makefile @@ -12,9 +12,9 @@ library: @echo "PSBLAS libraries Compilation Successful." install: - ($(INSTALL) -d $(INSTALL_LIBDIR) &&\ + (./mkdir.sh $(INSTALL_LIBDIR) &&\ $(INSTALL_DATA) lib/*.a $(INSTALL_LIBDIR)) - ($(INSTALL) -d $(INSTALL_INCLUDEDIR) && \ + (./mkdir.sh $(INSTALL_INCLUDEDIR) && \ $(INSTALL_DATA) lib/*$(.mod) $(INSTALL_INCLUDEDIR)) clean: (cd base; make clean) diff --git a/README b/README index 6de84ef2..831fd0db 100644 --- a/README +++ b/README @@ -121,6 +121,9 @@ After you have Make.inc fixed, run make to compile the library; go to the test directory and its subdirectories to get test programs done. +If you specify --prefix=/path you can do make install and the +libraries will be installed under /path/lib, while the module files +will be installed under /path/include. SERIAL: We now provide an (experimental) option to run in serial diff --git a/mkdir.sh b/mkdir.sh new file mode 100755 index 00000000..0a9820ea --- /dev/null +++ b/mkdir.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +dir=$1; + +dir_cmp=`echo $dir | sed 's./. /.g'` +if [ ! -d $dir ] +then + path='' + for cmp in $dir_cmp ; do + path="$path$cmp"; + if [ ! -d $path ] ; then + mkdir $path; rc=$?; + if [ $rc != 0 ] ; then + echo "Error while making directory $path " + exit 1 + fi + fi + done +fi + \ No newline at end of file