1# 2# This is the makefile for installing TAO. See the file 3# docs/installation.html for directions on installing TAO. 4# See also bmake/common for additional commands. 5# 6ALL: all 7 8 9# Call make recursively in these directory 10DIRS = src include docs tests 11 12include ${TAO_DIR}/conf/tao_base 13 14# 15# Basic targets to build TAO libraries. 16# all : builds the C/C++ and Fortran libraries 17all : tao_info tao_chk_tao_dir tao_chk_lib_dir tao_deletelibs tao_build tao_shared 18# 19# Prints information about the system and version of TAO being compiled 20# 21tao_info: 22 -@echo "==========================================" 23 -@echo " " 24 -@echo "Please send EVERYTHING printed out below when" 25 -@echo "reporting problems to tao-comments@mcs.anl.gov" 26 -@echo " " 27 -@echo "To subscribe to the TAO users mailing list, please " 28 -@echo "visit https://lists.mcs.anl.gov/mailman/listinfo/tao-news" 29 -@echo " " 30 -@echo "==========================================" 31 -@echo On `date` on `hostname` 32 -@echo Machine characteristics: `uname -a` 33 -@echo "-----------------------------------------" 34 -@echo "Using PETSc directory: ${PETSC_DIR}" 35 -@echo "Using PETSc arch: ${PETSC_ARCH}" 36 -@echo "Using TAO directory: ${TAO_DIR}" 37 -@echo "-----------------------------------------" 38 -@grep -e "TAO_VERSION_MAJOR" ${TAO_DIR}/include/tao_version.h | grep -v "&&" | sed "s/........//" 39 -@grep -e "TAO_VERSION_MINOR" ${TAO_DIR}/include/tao_version.h | grep -v "&&" | sed "s/........//" 40 -@grep -e "TAO_VERSION_PATCH" ${TAO_DIR}/include/tao_version.h | grep -v "&&" | sed "s/........//" 41 -@grep "define PETSC_VERSION" ${PETSC_DIR}/include/petscversion.h | ${SED} "s/........//" 42 -@echo "-----------------------------------------" 43 -@echo "Using PETSc configure Options: ${CONFIGURE_OPTIONS}" 44 -@echo "------------------------------------------" 45 -@echo "Using C/C++ include paths: ${TAO_INCLUDE}" 46 -@echo "Using C/C++ compiler: ${PCC} ${PCC_FLAGS} ${COPTFLAGS} ${CFLAGS}" 47 -@if [ "${FC}" != "" ]; then \ 48 echo "Using Fortran include/module paths: ${PETSC_FC_INCLUDES}";\ 49 echo "Using Fortran compiler: ${FC} ${FC_FLAGS} ${FFLAGS} ${FPP_FLAGS}";\ 50 fi 51 -@echo "-----------------------------------------" 52 -@echo "Using C/C++ linker: ${PCC_LINKER}" 53 -@echo "Using C/C++ flags: ${PCC_LINKER_FLAGS}" 54 -@if [ "${FC}" != "" ]; then \ 55 echo "Using Fortran linker: ${FC_LINKER}";\ 56 echo "Using Fortran flags: ${FC_LINKER_FLAGS}";\ 57 fi 58 -@echo "-----------------------------------------" 59 -@echo "Using PETSc libraries: ${PETSC_LIB}" 60 -@echo "Using TAO libraries: ${TAO_LIB}" 61 -@echo "------------------------------------------" 62 -@echo "Using mpiexec: ${MPIEXEC}" 63 -@echo "==========================================" 64 65 66 67# 68# Builds the TAO libraries 69# This target also builds fortran77 and f90 interface 70# files and compiles .F files 71# 72tao_build: 73 -@echo "BEGINNING TO COMPILE LIBRARIES IN ALL DIRECTORIES" 74 -@echo "=========================================" 75 -@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} TAO_DIR=${TAO_DIR} ACTION=libfast tree 76 -@${RANLIB} ${TAO_LIB_DIR}/*.${AR_LIB_SUFFIX} 77 -@echo "Completed building libraries" 78 -@echo "=========================================" 79 80# 81 82# Deletes TAO libraries 83tao_deletelibs: 84 -${RM} -f ${TAO_LIB_DIR}/libtao*.* 85 86 87tao_shared: shared 88 89install: 90 @${PYTHON} ./conf/install.py -destDir=${DESTDIR} 91 92tao_alletags: 93 -@maint/generateetags.py 94 95 96tao_testexamples: 97 -@PYTHONPATH=${TAO_DIR}/maint ./maint/runTests.py -d -e c 98 99tao_testexamples_uni: 100 -@PYTHONPATH=${TAO_DIR}/maint ./maint/runTests.py -d -e c single 101 102tao_testfortran: 103 -@PYTHONPATH=${TAO_DIR}/maint ./maint/runTests.py -d -e fortran 104 105tao_testfortran_uni: 106 -@PYTHONPATH=${TAO_DIR}/maint ./maint/runTests.py -d -e fortran single 107 108 109tao_allfortranstubs: 110 -@maint/generatefortranstubs.py ${BFORT} 111 112tao_manual: 113 cd docs/tex/manual; ${OMAKE} manual.pdf 114 115tao_deletemanpages: 116 ${RM} -f ${TAO_DIR}/docs/manpages/*/*.html \ 117 ${TAO_DIR}/docs/manpages/manpages.cit 118 119tao_allmanpages: tao_htmlpages tao_deletemanpages tao_pages tao_docsetdate 120 121tao_pages: 122 @mkdir -p ${TAO_DIR}/docs/manpages/taosolver 123 @mkdir -p ${TAO_DIR}/docs/manpages/taolinesearch 124 125 -${OMAKE} ACTION=tao_manpages_buildcite tree 126 -${OMAKE} ACTION=tao_manpages tree 127 -${OMAKE} ACTION=tao_manexamples tree LOC=${TAO_DIR} 128 -maint/wwwindex.py ${TAO_DIR} 129 130 131tao_htmlpages: 132 -${OMAKE} ACTION=tao_html TAO_DIR=${TAO_DIR} PETSC_DIR=${PETSC_DIR} alltree LOC=${TAO_DIR} 133 134 135tao_docsetdate: 136 @echo "Updating generated html files with TAO version, date info";\ 137 version_release=`grep '^#define TAO_VERSION_RELEASE ' include/tao_version.h |tr -s ' ' | cut -d ' ' -f 3`; \ 138 version_major=`grep '^#define TAO_VERSION_MAJOR ' include/tao_version.h |tr -s ' ' | cut -d ' ' -f 3`; \ 139 version_minor=`grep '^#define TAO_VERSION_MINOR ' include/tao_version.h |tr -s ' ' | cut -d ' ' -f 3`; \ 140 version_patch=`grep '^#define TAO_VERSION_PATCH ' include/tao_version.h |tr -s ' ' | cut -d ' ' -f 3`; \ 141 if [ $${version_release} = 0 ]; then \ 142 taoversion=tao-devel; \ 143 export taoversion; \ 144 elif [ $${version_release} = 1 ]; then \ 145 taoversion=petsc-$${version_major}.$${version_minor}-p$${version_patch}; \ 146 export taoversion; \ 147 else \ 148 echo "Unknown TAO_VERSION_RELEASE: $${version_release}"; \ 149 exit; \ 150 fi; \ 151 datestr=`hg tip --template "{date|shortdate}"`; \ 152 export datestr; \ 153 find * -type d -wholename src/docs/website -prune -o \ 154 -type f -name \*.html \ 155 -exec perl -pi -e 's^(<body.*>)^$$1\n <div id=\"version\" align=right><b>$$ENV{taoversion} $$ENV{datestr}</b></div>^i' {} \; \ 156 -exec perl -pi -e 's^(<head>)^$$1 <link rel="canonical" href="http://www.mcs.anl.gov/petsc/petsc-current/{}" />^i' {} \; ; \ 157 echo "Done fixing version number, date, canonical URL info" 158 159tao_chk_lib_dir: chklib_dir 160