Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 2495 | jroman | 1 | # |
| 2 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
||
| 3 | # SLEPc - Scalable Library for Eigenvalue Problem Computations |
||
| 4 | # Copyright (c) 2002-2010, Universidad Politecnica de Valencia, Spain |
||
| 5 | # |
||
| 6 | # This file is part of SLEPc. |
||
| 7 | # |
||
| 8 | # SLEPc is free software: you can redistribute it and/or modify it under the |
||
| 9 | # terms of version 3 of the GNU Lesser General Public License as published by |
||
| 10 | # the Free Software Foundation. |
||
| 11 | # |
||
| 12 | # SLEPc is distributed in the hope that it will be useful, but WITHOUT ANY |
||
| 13 | # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
||
| 14 | # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for |
||
| 15 | # more details. |
||
| 16 | # |
||
| 17 | # You should have received a copy of the GNU Lesser General Public License |
||
| 18 | # along with SLEPc. If not, see <http://www.gnu.org/licenses/>. |
||
| 19 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
||
| 20 | # |
||
| 1522 | slepc | 21 | |
| 22 | chkslepc_dir: |
||
| 2249 | jroman | 23 | @mypwd=`pwd`; cd ${SLEPC_DIR} 2>&1 > /dev/null; true_SLEPC_DIR=`pwd`; cd $${mypwd} 2>&1 >/dev/null; \ |
| 1522 | slepc | 24 | newpwd=`echo $${mypwd} | sed "s+$${true_SLEPC_DIR}+DUMMY+g"`;\ |
| 25 | hasslepc=`echo $${mypwd} | sed "s+slepc-+DUMMY+g"`;\ |
||
| 26 | if [ $${mypwd} = $${newpwd} -a $${hasslepc} != $${mypwd} ]; then \ |
||
| 27 | echo "*********************Warning*************************" ; \ |
||
| 2249 | jroman | 28 | echo "Your SLEPC_DIR may not match the directory you are in";\ |
| 29 | echo "SLEPC_DIR " $${true_SLEPC_DIR} "Current directory" $${mypwd};\ |
||
| 1522 | slepc | 30 | echo "******************************************************" ; \ |
| 31 | fi |
||
| 32 | |||
| 33 | slepc_manualpages: |
||
| 34 | -@if [ "${MANSEC}" != "" ] ; then \ |
||
| 35 | DOCTEXT_PATH=${PETSC_DIR}/src/docs/tex/doctext; export DOCTEXT_PATH; \ |
||
| 36 | ${DOCTEXT} -html \ |
||
| 37 | -mpath ${LOC}/docs/manualpages/${MANSEC} -heading SLEPc \ |
||
| 38 | -defn ${SLEPC_DIR}/src/docs/tex/doctext/html.def \ |
||
| 39 | -locdir ${LOCDIR} -mapref ${LOC}/docs/manualpages/manualpages.cit \ |
||
| 40 | ${SOURCEC} ${SOURCEH}; \ |
||
| 41 | chmod -f g+w ${LOC}/docs/manualpages/${MANSEC}/* ; fi |
||
| 42 | |||
| 43 | slepc_html: |
||
| 44 | -@sed -e s?man+../?man+ROOT/docs/manualpages/? ${LOC}/docs/manualpages/manualpages.cit > /tmp/$$USER.htmlmap |
||
| 45 | -@cat ${PETSC_DIR}/src/docs/mpi.www.index >> /tmp/$$USER.htmlmap |
||
| 46 | -@ROOT=`echo ${LOCDIR} | sed -e s?/[a-z]*?/..?g -e s?src/??g -e s?include/??g` ;\ |
||
| 47 | loc=`pwd | sed -e s?\$${PETSC_DIR}?$${LOC}/?g -e s?/disks??g`; \ |
||
| 48 | ${MKDIR} -p $${loc} ;\ |
||
| 49 | for i in ${SOURCEC} ${SOURCEF} ${SOURCEH} ${EXAMPLESC} ${EXAMPLESF} ${EXAMPLESCH} ${EXAMPLESFH} ${EXAMPLESMATLAB} foo ; do\ |
||
| 50 | if [ -f $$i ]; then \ |
||
| 51 | iroot=`echo $$i | sed -e "s?[a-z.]*/??g"`;\ |
||
| 52 | IROOT=`echo $${i} | sed -e s?[.][.]??g` ;\ |
||
| 53 | if [ "$${IROOT}" != "$${i}" ] ; then \ |
||
| 54 | IROOT=".."; \ |
||
| 55 | else \ |
||
| 56 | IROOT=$${ROOT};\ |
||
| 57 | fi;\ |
||
| 58 | ${RM} $${loc}/$$i.html; \ |
||
| 59 | echo "<center><a href=\"$${iroot}\">Actual source code: $${iroot}</a></center><br>" > $${loc}/$$i.html; \ |
||
| 60 | sed -e "s/CHKERRQ(ierr);//g" -e "s/PetscFunctionReturn(0)/return(0)/g" \ |
||
| 61 | -e "s/ierr [ ]*= //g" $$i | ${C2HTML} -n | ${PETSC_DIR}/bin/maint/fixinclude $$i $${ROOT} | \ |
||
| 62 | egrep -v '(PetscValid|PetscFunctionBegin|PetscCheck|PetscErrorCode ierr;|#if !defined\(__|#define __|#undef __|EXTERN_C|extern )' | \ |
||
| 63 | ${MAPNAMES} -map /tmp/$$USER.htmlmap -inhtml | sed -e s?ROOT?$${IROOT}?g >> $${loc}/$$i.html ; \ |
||
| 64 | fi; \ |
||
| 65 | done |
||
| 66 | -@ROOT=`echo ${LOCDIR} | sed -e s?/[a-z]*?/..?g -e s?src/??g -e s?include/??g` ;\ |
||
| 67 | loc=`pwd | sed -e s?\$${PETSC_DIR}?$${LOC}/?g -e s?/disks??g`; ${RM} $${loc}/index.html; \ |
||
| 68 | cat ${SLEPC_DIR}/src/docs/manualpages-sec/header_${MANSEC} | sed -e "s?<A HREF=\"PETSC_DIR[a-z/]*\">Examples</A>?<A HREF=\"$${ROOT}/docs/manualpages/${MANSEC}\">Manual pages</A>?g" -e "s?PETSC_DIR?$${ROOT}/?g"> $${loc}/index.html; \ |
||
| 69 | echo "<p>" >> $${loc}/index.html |
||
| 70 | -@loc=`pwd | sed -e s?\$${PETSC_DIR}?$${LOC}/?g -e s?/disks??g`;\ |
||
| 71 | if [ "${EXAMPLESC}" != "" ] ; then \ |
||
| 72 | for file in ${EXAMPLESC} foo ; do \ |
||
| 73 | if [ -f $$file ]; then \ |
||
| 74 | cmess=`grep "static char help" $${file} | cut -d\" -f2 | cut -d\. -f1`; \ |
||
| 75 | echo "<a href=\"$${file}.html\">$${file}: $${cmess}</a><br>" >> $${loc}/index.html;\ |
||
| 76 | fi; \ |
||
| 77 | done ;\ |
||
| 78 | else \ |
||
| 79 | for file in ${DIRS} foo; do \ |
||
| 80 | if [ -d $$file ]; then \ |
||
| 81 | echo "<a href=\"$${file}/\">$${file}/</a><br>" >> $${loc}/index.html; \ |
||
| 82 | fi; \ |
||
| 83 | done; \ |
||
| 84 | echo " " >> $${loc}/index.html; \ |
||
| 85 | for file in ${SOURCEH} ${SOURCEC} ${SOURCEF} foo ; do \ |
||
| 86 | if [ -f $$file ]; then \ |
||
| 87 | echo "<a href=\"$${file}.html\">$${file}</a><br>" >> $${loc}/index.html; \ |
||
| 88 | fi; \ |
||
| 89 | done; \ |
||
| 90 | fi ;\ |
||
| 91 | echo " " >> $${loc}/index.html; \ |
||
| 92 | echo "<a href=\"makefile.html\">makefile</a><br>" >> $${loc}/index.html |
||
| 93 | -@loc=`pwd | sed -e s?\$${PETSC_DIR}?$${LOC}/?g -e s?/disks??g`; \ |
||
| 94 | cat makefile | ${C2HTML} | ${MAPNAMES} -map /tmp/$$USER.htmlmap -inhtml > $${loc}/makefile.html |
||
| 95 | -@${RM} /tmp/$$USER.htmlmap tmp |
||
| 1714 | jroman | 96 | |
| 2495 | jroman | 97 | slepc_tree: ${ACTION} |
| 2266 | jroman | 98 | -@for dir in ${DIRS} ftn-auto ftn-custom f90-custom; do \ |
| 99 | if [ -d $$dir ]; then \ |
||
| 2278 | eromero | 100 | if [ "${PETSC_ARCH}" = "arch-installed-petsc" ]; then \ |
| 2277 | jroman | 101 | PETSCCONF="${PETSC_DIR}/include/petscconf.h" ; \ |
| 102 | else \ |
||
| 103 | PETSCCONF="${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h" ; \ |
||
| 104 | fi; \ |
||
| 2266 | jroman | 105 | r=`grep -w requirespackage $$dir/makefile`; \ |
| 106 | if [ "$$?" = 0 ]; then \ |
||
| 107 | PKGFLG=`echo $$r | cut -d \' -f2`;\ |
||
| 2277 | jroman | 108 | grep -w "#define $${PKGFLG}" $${PETSCCONF} > /dev/null; \ |
| 2266 | jroman | 109 | if [ "$$?" = 1 ]; then \ |
| 2395 | jroman | 110 | continue; \ |
| 2266 | jroman | 111 | fi; \ |
| 112 | fi; \ |
||
| 113 | r=`grep -w requiresfunction $$dir/makefile`; \ |
||
| 114 | if [ "$$?" = 0 ]; then \ |
||
| 115 | PKGFLG=`echo $$r | cut -d \' -f2`;\ |
||
| 2277 | jroman | 116 | grep -w "#define $${PKGFLG}" $${PETSCCONF} > /dev/null; \ |
| 2266 | jroman | 117 | if [ "$$?" = 1 ]; then \ |
| 2395 | jroman | 118 | continue; \ |
| 2266 | jroman | 119 | fi; \ |
| 120 | fi; \ |
||
| 121 | r=`grep -w requiresdefine $$dir/makefile`; \ |
||
| 122 | if [ "$$?" = 0 ]; then \ |
||
| 123 | PKGFLG=`echo $$r | cut -d \' -f2`;\ |
||
| 124 | grep -w "#define $${PKGFLG}" ${SLEPC_DIR}/${PETSC_ARCH}/include/slepcconf.h > /dev/null; \ |
||
| 125 | if [ "$$?" = 1 ]; then \ |
||
| 2277 | jroman | 126 | grep -w "#define $${PKGFLG}" $${PETSCCONF} > /dev/null; \ |
| 2267 | jroman | 127 | if [ "$$?" = 1 ]; then \ |
| 2395 | jroman | 128 | continue; \ |
| 2266 | jroman | 129 | fi; \ |
| 130 | fi; \ |
||
| 131 | fi; \ |
||
| 132 | r=`grep -w requireslanguage $$dir/makefile`; \ |
||
| 133 | if [ "$$?" = 0 ]; then \ |
||
| 134 | echo $$r | grep -w ${PETSC_LANGUAGE} > /dev/null; \ |
||
| 135 | if [ "$$?" = 1 ]; then \ |
||
| 136 | continue; \ |
||
| 137 | fi; \ |
||
| 138 | fi; \ |
||
| 139 | r=`grep -w requiresscalar $$dir/makefile`; \ |
||
| 140 | if [ "$$?" = 0 ]; then \ |
||
| 141 | echo $$r | grep -w ${PETSC_SCALAR} > /dev/null; \ |
||
| 142 | if [ "$$?" = 1 ]; then \ |
||
| 143 | continue; \ |
||
| 144 | fi; \ |
||
| 145 | fi; \ |
||
| 146 | r=`grep -w requiresprecision $$dir/makefile`; \ |
||
| 147 | if [ "$$?" = 0 ]; then \ |
||
| 148 | echo $$r | grep -w ${PETSC_PRECISION} > /dev/null; \ |
||
| 149 | if [ "$$?" = 1 ]; then \ |
||
| 150 | continue; \ |
||
| 151 | fi; \ |
||
| 152 | fi; \ |
||
| 153 | else \ |
||
| 154 | continue; \ |
||
| 155 | fi; \ |
||
| 156 | (cd $$dir ; \ |
||
| 157 | echo ${ACTION} in: `pwd`; \ |
||
| 2495 | jroman | 158 | ${OMAKE} slepc_tree ACTION=${ACTION} PETSC_ARCH=${PETSC_ARCH} LOC=${LOC} DATAFILESPATH=${DATAFILESPATH} BASE_DIR=${BASE_DIR});\ |
| 2266 | jroman | 159 | done |
| 160 | |||
| 2477 | jroman | 161 | # uses the cmake infrastructure to build/rebuild the libraries |
| 162 | slepc_cmake: |
||
| 2484 | jroman | 163 | @if [ "${SLEPC_BUILD_USING_CMAKE}" != "" ]; then \ |
| 164 | ${OMAKE} -j ${MAKE_NP} -C ${SLEPC_DIR}/${PETSC_ARCH}; \ |
||
| 165 | else \ |
||
| 166 | echo "CMake builds are disabled"; \ |
||
| 167 | fi |
||
| 2477 | jroman | 168 | |
| 2495 | jroman | 169 | include ${PETSC_DIR}/conf/rules |
| 1714 | jroman | 170 | include ${SLEPC_DIR}/${PETSC_ARCH}/conf/slepcrules |